gsudo vs. Invoke-SSHCommand for Admin Tasks

Automating administrative tasks on Windows often requires running scripts with elevated privileges. When you can’t have a UAC prompt interrupting your workflow, you need a reliable, non-interactive way to elevate. Two powerful and modern approaches to this problem are gsudo for local elevation and Invoke-SSHCommand for remote execution. This guide provides a deep dive into both tools, comparing their strengths and weaknesses to help you decide which one is the right fit for your automation needs, whether you’re managing a local machine or a fleet of remote servers. ...

November 10, 2025 · The PwshTips Team

PowerShell Remoting: WinRM vs. SSH

PowerShell is the go-to tool for automating tasks on Windows, and its remoting capabilities are a cornerstone of its power. For years, WinRM (Windows Remote Management) with the Invoke-Command cmdlet has been the standard. However, with the rise of cross-platform development and the native integration of OpenSSH in Windows, a new contender has emerged: Invoke-SSHCommand. Both cmdlets let you run commands on remote machines, but they operate on fundamentally different protocols. Understanding the difference is key to choosing the right tool for your environment. This guide breaks down the pros, cons, and best use cases for each. ...

November 9, 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

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

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

PowerShell SSH Remoting: Windows & Linux

PowerShell Remoting is a powerful feature that allows you to run commands on remote computers. While it traditionally used WinRM on Windows, modern PowerShell (pwsh) can now use SSH as its transport layer. This is a game-changer, as it provides a single, secure, and universal protocol to manage your entire fleet of servers, whether they are running Windows or Linux. This guide will walk you through setting up and using PowerShell SSH remoting, from basic commands to a real-world example of deploying an application to multiple servers at once. ...

October 27, 2025 · The PwshTips Team