A PowerShell User's Guide to Privilege Elevation: gsudo vs. Task Scheduler

For years, Linux and macOS users have enjoyed the convenience of the sudo command to run commands with administrative privileges. Now, the sudo experience has finally come to Windows in two popular forms: Microsoft’s official sudo, built into Windows 11, and the feature-rich, open-source gsudo. But which one do I use? This guide puts them in a head-to-head showdown, comparing their features, security, and best use cases to help me choose the right tool for my workflow. ...

December 14, 2025 · The PwshTips Team

PowerShell Remoting: The Ultimate Guide to WinRM and SSH

PowerShell Remoting is a cornerstone of Windows administration and automation. For years, it was synonymous with one protocol: WinRM. But with modern PowerShell and the ubiquity of SSH, we now have a powerful, cross-platform alternative. So, which protocol should you use? WinRM or SSH? This guide provides the definitive answer. We’ll explore the fundamental differences between the protocols, provide practical, step-by-step instructions for using both, and give clear recommendations for when to choose each one. ...

December 14, 2025 · The PwshTips Team

The PowerShell Guide to Offline Installations: Modules and Software

Managing servers in a secure or air-gapped environment presents a unique challenge: how do you install software, modules, and features without an internet connection? The answer is a simple but powerful workflow: use an online “staging” machine to download the necessary assets, transfer them via removable media, and then install them on the offline “target” machine. This guide provides a comprehensive walkthrough of this “Download, Transfer, Install” method for two of the most common offline scenarios: installing PowerShell modules and installing Windows features like the OpenSSH Server. ...

December 14, 2025 · The PwshTips Team

Troubleshooting Common Network Share Errors in PowerShell (Error 5, 53, and SMB Signing)

Accessing Windows network shares (SMB) is a daily task for most IT professionals, but it can be a source of major frustration when it fails. Cryptic error messages like “Access is Denied” or “The network path was not found” can stop an automation script in its tracks. I’ve found that these errors almost always fall into one of three categories: Connectivity, Permissions, or Security Policy. This guide provides a systematic, step-by-step process to diagnose and solve the most common SMB errors, saving you from hours of frustration. ...

December 14, 2025 · The PwshTips Team

Troubleshooting Domain Join & Windows Identity: A dsregcmd Guide

Leaving and rejoining a Windows computer to an Active Directory (AD) domain is a common troubleshooting step, but in modern hybrid environments, it’s a process filled with pitfalls. A single computer often has multiple identities—in local AD, in DNS, and in Azure AD (Entra ID). When these get out of sync, it leads to “ghost” identities, connection issues, and even being locked out of the machine entirely. This guide provides a definitive workflow for diagnosing these identity conflicts using the essential dsregcmd tool, cleaning up stale records, safely rejoining a domain, and recovering if you get locked out. ...

December 14, 2025 · The PwshTips Team

WSL Crashed and Fixed: A Connection Attempt Failed

Error on WSL I might encounter this error when trying to open my Linux distribution: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Error code: Wsl/Service/0x8007274c What Is This Error in WSL? The error message: “Error code: Wsl/Service/0x8007274c” is a Windows networking timeout (SocketException 10060 / HRESULT 0x8007274c). In the context of Windows Subsystem for Linux (WSL), it means that wsl.exe cannot connect to the WSL service or the Linux VM backend (WSL - 2). ...

November 27, 2025 · The PwshTips Team

Windows Defender Firewall: Management

The Windows Defender Firewall is a critical component of Windows security, controlling inbound and outbound network traffic to protect my system from unauthorized access and malicious activity. While often misunderstood, managing it effectively is essential for both security and application functionality. This post clarifies the distinction between “Windows Firewall” and “Windows Defender Firewall,” and provides command-line and PowerShell methods to manage its state (on/off) and configure rules. 1. “Windows Firewall” vs “Windows Defender Firewall” The naming of Windows’ built-in firewall can be a source of confusion, but the reality is simpler than it seems. ...

November 13, 2025 · The PwshTips Team

Fixing Office Activation Firewall Issues

When I tried to activate Microsoft Office in a corporate or restricted network environment, I encountered frustrating activation failures. Even with a valid license, Office activation can fail if it cannot communicate with Microsoft’s activation servers. This is almost always due to a firewall blocking the necessary outbound traffic. Note: This guide assumes you have already installed Microsoft Office. If you need a guide on how to automate the installation of Office 2021, see our companion article: Automate Office 2021 Install & Remove Old Versions ...

November 4, 2025 · The PwshTips Team

Test if a Network Port is Open

When diagnosing network connectivity issues, one of the most fundamental steps is to determine if a specific TCP port is open and listening on a remote host. A closed, blocked, or unresponsive port is often the root cause of application failures, and knowing how to test it is a critical skill for me. This guide provides a comprehensive overview of the most common and reliable methods to test port connectivity on Windows, from modern PowerShell cmdlets to classic command-line tools. ...

November 5, 2025 · The PwshTips Team

Unblock-File Cmdlet in PowerShell

If I’ve ever downloaded a script, installer, or even a help file from the internet, I’ve likely encountered a frustrating Windows security feature: the file is “blocked,” preventing it from running or displaying correctly. This is due to the “Mark of the Web,” a security mechanism designed to protect me from potentially malicious content. PowerShell provides a simple and elegant solution to this problem: the Unblock-File cmdlet. This guide will explain what the Mark of the Web is, how to identify blocked files, and how to use Unblock-File to safely manage them. ...

October 29, 2025 · The PwshTips Team