PwshTips / field notes for admins

PowerShell for real administration

Practical scripts, troubleshooting notes, and repeatable workflows for Windows, PowerShell, WSL, Linux, and automation.

Start with a focused guide, copy a tested command, and adapt it to your environment.

PwshTips PowerShell and Windows administration

Clear commands. Real constraints. Fewer surprises.

Manage Active Directory Without Logging On to a Domain Controller

Routine Active Directory work does not require an RDP session or an interactive console sign-in on a domain controller. A separate, managed administration workstation is a better place to run the AD tools, inspect objects, make a narrow change, and keep a record of who performed it. That separation matters. Domain controllers hold directory credentials, Kerberos keys, DNS data, and the tools that change the forest. Browsing the web, opening email, or running a general-purpose admin desktop workflow on a DC increases the chance that a workstation-style problem becomes a directory-wide incident. ...

August 16, 2026 · 10 min · PwshTips

Run Go Programs from PowerShell

Go and PowerShell work well together on Windows. PowerShell is convenient for orchestration, object filtering, scheduled tasks, and Windows management APIs. Go is useful when a small tool needs a single compiled executable, predictable startup behavior, or easy distribution to machines that do not have a PowerShell module installed. The useful split is simple: use PowerShell to prepare inputs, call the Go program, inspect its output, and react to its exit code. Let the Go program own the focused task it was written for. Do not make PowerShell scrape a human-oriented console screen when the Go command can return structured JSON or a clear exit code instead. ...

August 16, 2026 · 9 min · PwshTips

Run PowerShell Scripts from Go

Go is a good place to coordinate a Windows utility that needs a compiled executable, HTTP service, queue worker, or structured application logic. PowerShell is still useful for the Windows task itself: calling a mature module, querying local configuration, or using an administrative command that already exists as a script. The reliable boundary is a PowerShell script file with named parameters, predictable standard output, useful standard error, and an explicit exit code. Let Go launch that file as a process. Do not build one large PowerShell command string from user input and hand it to -Command; nested quoting becomes fragile and command injection becomes easy to introduce. ...

August 16, 2026 · 11 min · PwshTips

Upgrade Go to the Latest Version in WSL/Linux

Upgrading Go in WSL or Linux is usually one archive extraction, but it is easy to hide an old compiler behind PATH or accidentally accept a dependency-file rewrite while testing it. The compiler installation and the module files are separate concerns. Treat them that way and the upgrade is straightforward to test and easy to roll back. I first select the new compiler, run an existing project’s tests and build, and inspect go.mod and go.sum before deciding whether either file should change. A compiler upgrade does not, by itself, require a new module language version or a dependency cleanup. ...

August 16, 2026 · 11 min · PwshTips

Upgrade Go to the Latest Version on Windows

Upgrading Go on a Windows workstation should be a small change, but it can become confusing when two things change at once. The installed Go compiler changes first. Then a command such as go mod tidy may propose changes to go.mod and go.sum. Those are related, but they are not the same job. I keep the first upgrade test deliberately narrow: install or select the new compiler, run the existing project’s tests and build, and inspect the module files before accepting any change. That gives a useful answer when a project fails: is this a compiler/toolchain problem, or did the dependency graph change? ...

August 16, 2026 · 11 min · PwshTips

Fix Windows Primary Domain Failed

A domain user might be unable to sign in to an otherwise healthy Windows workstation and receive this message: The trust relationship between this workstation and the primary domain failed. A Windows workstation cannot authenticate its computer account to the Active Directory domain. This is an Active Directory computer-account problem, not usually a bad password for the person signing in. The workstation has a secure channel to the domain. Windows uses that channel to authenticate the computer account before it can complete normal domain operations. When the workstation and Active Directory no longer agree on that account’s machine password, Windows refuses the domain sign-in. ...

August 12, 2026 · 8 min · PwshTips

Fix Error 4294967295 on Microsoft 365

I encountered error 4294967295 when installing Microsoft 365 with winget. The installer downloaded successfully and its hash was verified, but the Microsoft Office Click-to-Run installer failed when the package installation started. This error is confusing because winget appears to work correctly until the final installer step. The package is found, the download completes, and the installer is verified. The failure comes from the Office installer or an existing Office installation rather than from the basic winget search operation. ...

August 11, 2026 · 7 min · PwshTips

Fix Failed Code 1618

I received error 1618 when installing 7-Zip with winget. The package was found, the installer hash was verified, and the installation started, but Windows reported that another installation was already in progress. This error is normally related to Windows Installer, also known as MSI. Windows Installer allows only one MSI installation transaction at a time. If another operation is running, waiting for input, or stuck after an earlier failure, a second package installation returns error 1618. ...

August 11, 2026 · 7 min · PwshTips

Fix E45 in Vim

Vim is an improved version of the traditional vi editor. It is a popular command-line editor on Linux and Unix systems, and it is also available on Windows. Many administrators use it to edit configuration files directly on a server, often through an SSH session. The first time Vim refuses to save a long configuration file, it can feel like the file is lost. The content is still in Vim’s buffer, but the current user does not have permission to write the file back to disk. The important thing is to stay in Vim and use the buffer to write the file through sudo. ...

August 10, 2026 · 9 min · PwshTips

Manage Hosts by RDCMan and Tabby

I manage two different types of remote computers every week: Windows hosts that I access through Remote Desktop Protocol (RDP), and Linux hosts that I access through Secure Shell (SSH). Instead of putting every connection into one large application, I use two focused tools: Microsoft Sysinternals RDCMan for Windows RDP connections and Tabby for Linux SSH connections. This arrangement keeps the connection type visible. When I need a Windows desktop, I open RDCMan. When I need a Linux shell, I open Tabby. Both applications are lightweight enough to leave available during the day, and both let me organize a growing list of hosts into named groups. ...

August 10, 2026 · 9 min · PwshTips