Windows Server
Last updated:
How to remove IIS from Windows Server using PowerShell
Follow this if you have no more need for Windows Server IIS and want to remove IIS completely from Windows Server using PowerShell
PowerShell Scripts & Automation Guides for Sysadmins
Welcome to the central repository for PowerShell automation and scripting guides on saotn.org. As environments scale, manual configuration becomes a bottleneck. PowerShell is the definitive tool for Windows Server administration, IIS management, and cloud infrastructure automation.
Whether you are looking to deploy rapid security fixes, automate your monthly update cycles, or streamline your local DevOps workflow, these practical, real-world scripts are designed to save you time and eliminate repetitive tasks.
Core Automation Categories
To help you navigate through the collection, our top-performing PowerShell resources are grouped by technical focus:
Windows Server & Active Directory Management: Automate core infrastructure tasks. Learn how to list all SPNs used in your Active Directory or fetch SSH keys seamlessly.
IIS & Web Infrastructure: Skip the IIS Manager GUI. From installing IIS on Windows 11 to programmatically adjusting advanced application pool settings, master command-line web administration.
Windows Update & WSUS Automation: Keep your fleet secure without the clicking. Streamline your patch management with deep-dives like installing Windows Updates via PowerShell and deploying Servicing Stack Updates (SSU).
Security & Network Administration: Harden your network endpoints. Use scripts to manage Windows Firewall rules or execute HTTPS GET requests with SSL client certificates safely.
Browse the chronological list of all PowerShell articles, snippet breakdowns, and troubleshooting guides below. All code blocks are verified, production-ready, and optimized for modern Windows environments.
Windows Server
Last updated:
Follow this if you have no more need for Windows Server IIS and want to remove IIS completely from Windows Server using PowerShell
Windows Server
Last updated:
WSUS uses BITS for downloading updates, and it does so in background mode. Unfortunately, this utilizes remaining bandwidth of the server instead of its full capacity. To speed up WSUS downloads, you can configure BITS in WSUS to use foreground priority.
Windows Server
Last updated:
When you migrate a file server and transfer data, you may need to recreate junction points, as they cannot be copied using (for example) Robocopy.exe. This makes it a must to know where you have junction points, and NTFS hard and soft links. This is where PowerShell comes to the rescue.
Windows Server
Last updated:
Find vulnerable WordPress plugins fast using PowerShell on Windows Server and IIS
Windows Server
Last updated:
In this post, I will show you how to connect to your KVM VMs (virtual machines) in Windows 10 via SSH using virt-manager (Virtual Machine Manager) and qemu+ssh://. This allows you to manage your virtual machines from Windows.
Windows Server
Last updated:
This post contains some example WMI filters for you to use in Group Policy Objects (GPOs) to target and manage specific Windows Server versions like 2012R2, 2016 and Windows Server 2022 / 2019.
Windows Server
Last updated:
In this post I'll show you how to configure an IP allow list for IIS FTP Server using PowerShell, iisadministration and webadministration modules.
Codebase
Last updated:
Remove application folders from the website configuration in IIS whose physical path on the filesystem was removed, using PowerShell
Windows Server
Last updated:
Learn how to back up and restore IIS 10 webserver configuration with appcmd.exe and PowerShell
Windows Server
Last updated:
Using -SeachBase with PowerShell's Get-ADComputer gives me faster results with AD DS queries.
Windows Server
Last updated:
Install Servicing Stack Updates (SSU) for Windows Server 2012R2, 2016 and Windows Server 2019 using PowerShell, without downtime.
Windows Server
Last updated:
A couple of years ago, I wrote a blog article about setting up Monit monitoring on an Ubuntu VM on Hyper-V. Now it's time to do the same, but then in Windows Subsystem for Linux, or WSL. So, without further ado, here is how to install and configure Monit monitoring in Windows 10 WSL.
Windows Server
Last updated:
Learn how to silently import a .reg file into your Windows Registry. This neat regedit trick comes in handy quite often. The regedit command is valid for Windows 11, 10, Windows Server 2022, 2019 and older.
Windows Server
Last updated:
A manual SQL Server failover can only be initiated from the principal server, and the mirrored database must be synchronized (that is, when the database is in the SYNCHRONIZED state). In this article I will show you how to manual failover mirrored SQL Server databases using Transact-SQL (T-SQL) in SQL Server 2017 and up.
Windows Server
Last updated:
Learn how to use Get-Item and Get-ItemProperty in PowerShell to work with file attributes, compare file versions and change timestamps.
Windows Server
Last updated:
Using setspn.exe: 3 unique methods to list Service Principal Names (SPNs) in your Windows network quickly using PowerShell / CMD.exe. An SPN or Service Principal Name is a unique identity for a service, mapped with a specific account.
Windows Server
Last updated:
Users can install and run multiple .NET Framework versions on their computers. When you develop or deploy your app, you might need to know which .NET versions are installed on a machine and here is how to check the .NET version.
Windows Server
Last updated:
Compressed SQL Server backups can be verified in PowerShell using a handy PowerShell function. This comes in handy when you need to verify if existing SQL Server backups are compressed.
Windows Server
Last updated:
Unzip a file on your PowerShell command-prompt may come in handy sometimes, even on your Windows 11/10 workstation. Use Expand-Archive for this, and all that is required is PowerShell 5.0+, or the .NET 4.5+ Framework to use System.IO.Compression.ZipFile.
Windows Server
Last updated:
WSUSPool keeps stopping? Sometimes you find your WSUS server keeps crashing over and over again. The WSUS application pool periodically stops, WSUS is unavailable and/or the WSUS management console hangs.