Non-Interactive Elevation on Windows

Automating tasks that require administrator privileges on Windows presents a common challenge: how do you handle the UAC (User Account Control) prompt in a non-interactive script, such as in a CI/CD pipeline or a scheduled task? Attempting to bypass UAC is a major security risk and is not recommended. Instead, you should use tools and methods that are designed for non-interactive elevation. This guide will cover the two best approaches: using the open-source gsudo tool for scripted elevation and the built-in Windows Task Scheduler. ...

November 8, 2025 · The PwshTips Team

Remote Admin: WinRM vs. SSH for Elevated Tasks

When you need to run a command as an administrator on a remote Windows machine, you have two primary technologies to choose from: the traditional WinRM (Windows Remote Management) and the modern, cross-platform OpenSSH. Both can get the job done, but they handle elevation and authentication in fundamentally different ways. This guide will provide a deep dive into both methods, comparing their strengths, weaknesses, and best use cases to help you choose the right tool for your remote administration needs. ...

November 8, 2025 · The PwshTips Team

Windows sudo vs. gsudo

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 should you use? This guide will put them in a head-to-head showdown, comparing their features, security, and best use cases to help you choose the right tool for your workflow. ...

November 8, 2025 · The PwshTips Team

File Transfer Speed: SCP vs. Robocopy vs. Copy-Item

When it comes to transferring large files (10–100 GB) between Windows systems, the tool you choose can have a massive impact on speed, reliability, and security. In this ultimate showdown, we compare three titans of file transfer: the secure and universal SCP (OpenSSH), the multi-threaded powerhouse Robocopy (SMB), and the PowerShell-native Copy-Item (WinRM). We’ll test them across different network conditions, from a high-speed 10 GbE LAN to a real-world 5G wireless connection, to help you decide which tool reigns supreme for your specific needs. ...

November 7, 2025 · The PwshTips Team

SSH vs. WinRM: PowerShell Remoting

In the world of remote administration with PowerShell, two protocols stand out: the traditional, Windows-native WinRM (Windows Remote Management) and the modern, cross-platform SSH (Secure Shell). Both allow you to execute commands on remote machines, but they are built on fundamentally different technologies and philosophies. Choosing the right protocol is crucial for building a secure, efficient, and scalable automation strategy. This guide will provide a deep dive into both SSH and WinRM, comparing their setup, security, performance, and best use cases to help you make an informed decision. ...

November 6, 2025 · The PwshTips Team

Automate Office 2021 Install & Remove Old Versions

When deploying Microsoft Office 2021, one of the key considerations is how to handle older, existing versions like Office 2010. By default, the modern Office installer will automatically remove these older versions, but for automated or customized deployments, you need more control. This guide will walk you through using the Office Deployment Tool (ODT) to create a silent, automated installation of Office 2021 that also cleanly removes any older Office versions. ...

November 4, 2025 · The PwshTips Team

Fixing Office Activation Firewall Issues

If you’ve ever tried to activate Microsoft Office in a corporate or restricted network environment, you may have 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. This guide provides a comprehensive overview of the required domains and ports for Office activation and offers ready-to-use scripts to configure various firewalls, including Windows Firewall, Cisco ASA, Palo Alto, pfSense, and Linux iptables. ...

November 4, 2025 · The PwshTips Team

How to Install PowerShell Modules Offline

In a secure or air-gapped environment, you can’t use Install-Module to download modules directly from the PowerShell Gallery. However, you can use an online machine to download the module and its dependencies, transfer them to the offline machine, and install them manually. This guide will walk you through the process using the popular Posh-SSH module as an example, but the steps can be applied to any module from the PowerShell Gallery. ...

November 5, 2025 · The PwshTips Team

Install OpenSSH Server Offline on Windows

In a secure or air-gapped environment, installing Windows features that normally require an internet connection can be a challenge. A common example is the OpenSSH Server, which is essential for secure remote management. When you run Add-WindowsCapability, Windows typically downloads the package from Microsoft Update. This guide provides two reliable methods for installing the OpenSSH Server on an offline Windows machine (Server 2019/2022 or Windows 10/11), ensuring you can maintain security and manageability even without internet access. ...

November 5, 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 any IT professional. 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