# pwshtips.com > Practical PowerShell tips, scripts, and tutorials for System Administrators and DevOps Engineers. ## Posts - [Zero-Byte Deploys and Zombie Jobs: A Failover War Story](https://pwshtips.com/posts/failover-war-story/): Building a 60-second failover standby for my dev environment — and the two outages that taught me to never trust an all-green deploy chain. - [Three Machines, One Shell: Relaying Commands from an AI Agent to WSL via a VPS](https://pwshtips.com/posts/muse-vps-wsl-command-relay/): A persistent, bidirectional command channel between an AI agent VM, a small VPS relay, and a Windows laptop's WSL — what each piece does, how to set it up, and the dozen pitfalls I actually hit. - [Protecting a PowerShell Watchdog Script from Tampering](https://pwshtips.com/posts/protect-watchdog-script-from-tampering/): A scheduled PowerShell script running as SYSTEM is a high-value target. Lock it down with NTFS ACLs, code signing, auditing, and central deployment. - [Create a Watchdog in Windows: Keep Your Cellular APN Correct and Connected](https://pwshtips.com/posts/create-watchdog-windows-cellular-apn/): A scheduled PowerShell watchdog that checks the Windows WWAN APN every 5 minutes and reinstalls the profile and reconnects when it drifts. - [From Anywhere to My MUSE AI's Shell](https://pwshtips.com/posts/from-anywhere-to-my-muse-ais-shell/): A Tailscale terminal-access postmortem: separate control-plane failures from SSH, trace TCP resets, and choose an authenticated access path. - [What is Copilot?](https://pwshtips.com/posts/what-is-copilot/): A practical guide to Microsoft Copilot, Microsoft 365, GitHub Copilot, phone and web apps, IDE integrations, prices, and alternatives. - [SSH Tunnel to VPS: A Reverse Tunnel Blocked by Egress Filtering](https://pwshtips.com/posts/ssh-tunnel-to-vps/): A reverse SSH tunnel test with an Oracle Cloud VPS, Ubuntu socket activation, proxy diagnostics, and the egress policy that stopped connectivity. - [Harden your Windows](https://pwshtips.com/posts/harden-your-windows/): Practical Windows 11 hardening steps for local accounts, network protocols, Remote Desktop, memory integrity, and Defender ASR rules. - [WSL Update Failed with 1618](https://pwshtips.com/posts/wsl-update-failed-with-1618/): How to troubleshoot and fix WSL update error 1618 (Wsl/UpdatePackage/0x80070652) caused by concurrent Windows Installer locks and pending system reboots. - [Enable remote edit on Windows](https://pwshtips.com/posts/enable-remote-edit-on-windows/): Install Microsoft's lightweight Edit terminal editor with winget and use it safely over SSH or PowerShell remoting, with Vim as a fallback. - [Enable a Second Account for RDP](https://pwshtips.com/posts/enable-a-second-account-for-rdp/): Add another Windows 11 account to Remote Desktop Users, test its credentials, and understand the one-session limit. - [How to Use GitHub for System Administrators](https://pwshtips.com/posts/how-to-use-github/): A practical guide to GitHub: registration, mandatory 2FA, token authentication, repositories, projects, gists, cloning, and pull request workflows. - [Fix The handle is invalid](https://pwshtips.com/posts/fix-the-handle-is-invalid/): Diagnose Microsoft Edit error 0x80070006 in Enter-PSSession and use SSH or PowerShell file transfer to edit remote Windows files. - [How to Install Git on Windows and Linux (WSL)](https://pwshtips.com/posts/how-to-install-git/): Install Git on Windows and WSL Linux, configure shared Windows credentials, set line ending standards, and master daily Git commands. - [The Poller That Wasn't Dead: Debugging a Phantom Outage on Windows](https://pwshtips.com/posts/debug-phantom-poller-outage/): My laptop's background poller kept going 'offline' for 10–18 minutes at a time. I blamed Windows sleep, changed the power settings, and was completely wrong. Here's how the event log and a timestamped audit trail found the real culprit: a network stall. - [50 PowerShell Tips for Windows Admins](https://pwshtips.com/posts/50-powershell-tips-for-windows-admin/): 50 field-tested PowerShell tips: console habits, remoting, AD one-liners, disk and network checks, and the performance gotchas that bite. - [How to Create and Manage a Team on GitHub](https://pwshtips.com/posts/create-a-team-on-github/): Comprehensive guide to GitHub Organizations and Teams: member roles, granting repository access, branch protection, CODEOWNERS, and Pull Request reviews. - [How to Block League of Legends with Windows Firewall](https://pwshtips.com/posts/how-to-block-league-of-legends-in-firewall/): Router port blocking can't stop League of Legends. Here's why it fails — and a PowerShell script that blocks it with Windows Firewall app rules, demotes the user to standard, and deploys over PSSession or SSH. - [How to Build a Local Git Server on Ubuntu](https://pwshtips.com/posts/build-a-local-git-server/): Step-by-step guide to building a self-hosted, GitHub-like Git server on Ubuntu using Gitea, Caddy reverse proxy, SSH passthrough, and team permissions. - [Fix git bad object HEAD on Windows](https://pwshtips.com/posts/fix-git-bad-object-head/): Fix the fatal: bad object HEAD error in git status on Windows caused by a corrupted HEAD reference or missing objects, with step-by-step recovery commands. - [Enable Remote Access to a Non-Domain Windows Computer](https://pwshtips.com/posts/enable-remote-access-non-domain-computer/): How to gain remote access to an unpingable non-domain Windows computer with zero console or physical access, using only its IP, local admin credentials, and PsExec to enable RDP, WinRM, and OpenSSH. - [Create an Oracle Free VPS](https://pwshtips.com/posts/create-oracle-free-vps/): Register for Oracle Cloud Free Tier, create an Always Free eligible Ubuntu compute instance, configure its VCN and SSH access, then connect and maintain it. - [Upgrade Go to the Latest Version on Windows](https://pwshtips.com/posts/upgrade-go-to-latest-version-windows/): Upgrade Go on Windows either side by side or as a replacement, then verify go.mod and go.sum without changing a project unexpectedly. - [Upgrade Go to the Latest Version in WSL/Linux](https://pwshtips.com/posts/upgrade-go-to-latest-version-wsl-linux/): Upgrade Go in WSL or Linux side by side or as a replacement, verify the official archive, and keep go.mod and go.sum under control. - [Fix Discord Error Code 4294967295](https://pwshtips.com/posts/fix-discord-error-code-4294967295/): How to troubleshoot and fix Discord installation error code 4294967295 in winget by resolving locked Squirrel installer directories and lingering background processes. - [Run PowerShell Scripts from Go](https://pwshtips.com/posts/run-powershell-scripts-from-go/): Call a parameterized PowerShell script from Go on Windows with safe arguments, JSON output, timeouts, and reliable exit-code handling. - [Run Go Programs from PowerShell](https://pwshtips.com/posts/run-go-programs-from-powershell/): Run, build, and automate Go programs from PowerShell on Windows, including arguments, output, exit codes, and reusable executables. - [Manage Active Directory Without Logging On to a Domain Controller](https://pwshtips.com/posts/manage-active-directory-without-logging-on-to-domain-controller/): Use an admin workstation, RSAT, PowerShell, Microsoft diagnostics, and Sysinternals AD Explorer to manage Active Directory without routine domain controller logons. - [Fix Windows Installer Error 1618: 7-Zip Install Blocked by Another Installation](https://pwshtips.com/posts/fix-failed-code-1618/): How to fix winget error 1618 when another Windows Installer operation is already in progress. - [Fix Windows Primary Domain Failed](https://pwshtips.com/posts/fix-windows-primary-domain-failed/): Fix the Windows error The trust relationship between this workstation and the primary domain failed by checking DNS, repairing the secure channel, and rejoining the domain only when necessary. - [Fix Error 4294967295 on Microsoft 365](https://pwshtips.com/posts/fix-error-4294967295-microsoft-365/): How to fix winget error 4294967295 when installing Microsoft 365 or Microsoft Office by repairing, elevating, or completely removing the existing Office installation. - [Manage Hosts by RDCMan and Tabby](https://pwshtips.com/posts/manage-hosts-by-rdcman-and-tabby/): Use Sysinternals RDCMan for Windows RDP hosts and Tabby for Linux SSH hosts, with practical host-group layouts and launch scripts. - [Fix E45 in Vim](https://pwshtips.com/posts/fix-e45-in-vim/): How to save a read-only file in Vim with sudo tee, handle the W12 reload warning, and avoid losing a long configuration file. - [Upgrade WSL from Ubuntu 24.04 to 26.04](https://pwshtips.com/posts/upgrade-wsl-ubuntu-24-04-to-26-04/): How to upgrade an existing Ubuntu-24.04 WSL instance to Ubuntu 26.04 in place while keeping its files, packages, configuration, and project data. - [PowerShell Is Denied in Tabby](https://pwshtips.com/posts/pwsh-is-denied-in-tabby/): How I fixed pwsh.exe returning Access is denied inside the Tabby terminal after installing PowerShell Preview on Windows. - [How to Detect If a Host Is Windows or Linux](https://pwshtips.com/posts/detect-host-windows-or-linux/): Use ping, PowerShell, Windows built-in tools, WinRM, CIM, and SSH to determine whether a remote host is running Windows or Linux. - [Windows Scheduled Tasks vs Linux Cron Jobs](https://pwshtips.com/posts/windows-scheduled-task-vs-linux-cron/): A practical comparison of Windows Task Scheduler and Linux cron jobs, including pros, cons, examples, and what each scheduler can and cannot do well. - [Use WSL Cron Jobs to Run Windows Scheduled Tasks](https://pwshtips.com/posts/wsl-cron-run-windows-scheduled-tasks/): How to use cron inside WSL to trigger Windows scheduled tasks on the local computer and remote Windows servers, and how to start and keep WSL alive after boot. - [Scheduled Tasks with PowerShell for Local and Remote Deployment](https://pwshtips.com/posts/powershell-scheduled-tasks-deployment/): How to create scheduled tasks with PowerShell and use them to deploy scripts, copy files, run Robocopy, install MSI packages, and start BAT files on local or remote Windows computers. - [Run PowerShell from WSL Cron](https://pwshtips.com/posts/wsl-cron-run-powershell-windows-linux-services/): How to run PowerShell from a WSL cron job to copy files between Windows and WSL, run Windows scripts, restart WSL services such as Hugo, and restart Windows services such as IIS. - [Fix VS Code WSL Server 404](https://pwshtips.com/posts/vscode-wsl-failed-download-server-404/): How to fix VS Code Remote WSL failing to download the VS Code Server with HTTP 404 after an update, and why WSL can still work from the command line. - [Fix Task Scheduler Error 2147750687](https://pwshtips.com/posts/task-scheduler-error-2147750687-already-running/): How to troubleshoot Windows Task Scheduler Event ID 101 with error value 2147750687, why it usually means another instance is already running, and how to fix overlapping or stuck scheduled tasks. - [Remove Temporary Hex Folders from the C Drive](https://pwshtips.com/posts/remove-temporary-hex-folders-from-c-drive/): Why Windows installers leave random hex folders on C:\, why deletion may require SYSTEM permission, and how to remove confirmed temporary installer folders with PowerShell. - [Windows Event Log Tampering: What Admins Should Defend Against](https://pwshtips.com/posts/windows-event-log-tampering-defense/): Defensive notes on Windows event log tampering, audit risk, detection signals, and practical controls for administrators. - [PowerShell Logging Patterns for Production Scripts](https://pwshtips.com/posts/powershell-logging-patterns-production-scripts/): Practical logging patterns for PowerShell scripts that run unattended in scheduled tasks, servers, and admin automation. - [Recover Windows Event Logs After They Are Cleared](https://pwshtips.com/posts/recover-windows-event-logs-after-clearing/): What administrators can recover after Windows event logs are cleared, and how to prevent local log loss with forwarding, exports, and central collection. - [PowerShell Error Handling with Try, Catch, and Finally](https://pwshtips.com/posts/powershell-error-handling-try-catch-finally/): How to handle PowerShell errors with try, catch, and finally while writing error messages to both the console and a log file. - [PowerShell Fundamentals: Operators, Objects, and Script Paths](https://pwshtips.com/posts/mastering-powershell-fundamentals/): Practical notes on PowerShell operators, object pipelines, custom objects, JSON/CSV output, and reliable script paths. - [PowerShell for IT Inventory: Getting All Installed Apps from Remote Windows PCs](https://pwshtips.com/posts/powershell-for-it-inventory-getting-all-installed-apps-from-remote-windows-pcs/): How to use PowerShell to discover Windows PCs, query installed applications remotely, and export a software inventory report. - [PowerShell for Cross-Platform Administration](https://pwshtips.com/posts/powershell-cross-platform-administration/): How to use PowerShell with Bash, CMD, JSON, and WSL when working across Windows and Linux. - [Installing PowerShell Online and Offline](https://pwshtips.com/posts/complete-guide-to-powershell-installation/): How to install PowerShell and modules on connected machines and offline or restricted networks. - [Essential PowerShell Security: Privileges, Firewalls, and File Safety](https://pwshtips.com/posts/essential-powershell-security-and-privileges/): PowerShell security notes for elevation, Windows Defender Firewall rules, and safely unblocking downloaded files. - [Automating Office and Active Directory with PowerShell](https://pwshtips.com/posts/automating-office-and-active-directory/): PowerShell notes for Office deployment, Office activation firewall rules, Get-ADUser queries, and domain rejoin troubleshooting. - [Advanced Troubleshooting for Windows Environments](https://pwshtips.com/posts/advanced-troubleshooting-windows-environments/): Troubleshooting notes for Windows network share errors, WSL crashes, VMware TPM checks, and disk space problems. - [PowerShell Remoting with WinRM and SSH](https://pwshtips.com/posts/powershell-remoting-the-ultimate-guide-to-winrm-and-ssh/): How to choose between WinRM and SSH for PowerShell remoting on Windows, Linux, and mixed environments. - [File Transfer Speed: SCP vs. Robocopy vs. Copy-Item](https://pwshtips.com/posts/copy-speed-scp-robocopy-copyitem/): A real-world performance comparison between SCP, Robocopy, and PowerShell's Copy-Item for transferring large files over LAN and 5G networks, showing how I chose the right tool for the job. - [Test if a Network Port is Open](https://pwshtips.com/posts/detect-port-is-opened/): How to check whether a TCP port is open, blocked, or unreachable using PowerShell, Telnet, and PortQry. - [Clone a Bootable USB to an ISO](https://pwshtips.com/posts/bootable-usb-to-iso-with-pwsh/): How to back up a bootable USB drive to an image file using PowerShell with WSL, Win32DiskImager, or Linux dd. - [Manage Pinned Taskbar Items with PowerShell](https://pwshtips.com/posts/manage-taskbar-pinned-items-with-pwsh/): How to list and remove Windows taskbar pinned applications with PowerShell and Shell.Application. ## Sitemap - [Full sitemap](https://pwshtips.com/sitemap.xml)