In this post I showed you how you can use PowerShell to install Windows Updates. Quickly and silently. This makes the use of PSWindowsUpdate module perfect for your day to day automation. The module even supports scheduling (on remote computers too!), it has the ability to search WSUS and Windows Update for updates, scheduling and performing the download and installation of updates.
PowerShell Tag Archive
Send email with PowerShell
In this post I provide you with a small PowerShell function you can use to send email over a TLS secured SMTP connection with SMTP authentication. As a framework you can use in your own scripting and extend it. You can even create a PowerShell module of it.
Windows 11/10 and WSL 2 DevOps environment
In this post I showed you how you can turn Windows 11 and Windows 10 with WSL into a fully fledged development environment. Here are the settings and tools I use for DevOps/SysOps on Windows. It may take some getting used to, but if you’re as shortcut-Ninja as I’m (I alt-tab, ctrl-c/ctrl-v a lot), you can work pretty fast in this set up.
Monitor .NET CLR Garbage Collected heap from your web application
Use Zabbix to monitor your web application and application pool’s .NET CLR Garbage Collected heap by utilizing WMI and PowerShell.
Quickly check EnableTrailerSupport isn’t set in your network for http.sys (CVE-2022-21907)
Find out fast if your IIS webservers have EnableTrailerSupport enabled for https.sys in the registry. Here is a small PowerShell method.
Adding VirtIO drivers to Windows Recovery Environment (Windows RE)
If you need to add VirtIO drivers to your Windows Recovery Environment (Windows RE) to recover your Windows virtual machine, here is how. The following steps come in handy if you found out the hard way you don’t see any disks in Windows RE after a hard crash. Learn to customize your Windows System Restore and rescue Windows like a pro!
Retrieve SSH public key from Active Directory for SSH authentication
How to configure SSH public key authentication for Windows Server in Active Directory (AD)? In this article I’ll explain how to store and retrieve your SSH public keys from Windows Server Active Directory.
Install SQL Server cumulative updates silently
Installing SQL Server cumulative updates is always a cumbersome, and quite daunting task. Unpacking and running the CU installer is a slow process, you have to click through a lot of screens, and it’s hard to get it to install silently. But here is how!
Remove computer object from Windows Server Update Services (WSUS) in PowerShell
Here is a short PowerShell snippet for you to remove a computer object from Windows Server Update Services (WSUS).
How to add, list and remove IP addresses in Windows Firewall
Here is how to bulk add IP addresses in the Windows Firewall, list an IP address and remove all IP addresses from Windows Defender Firewall with Advanced Security. In Windows 11, 10 and Windows Server
Block brute force attacks on SQL Server, block IP addresses in Windows Firewall using PowerShell
This PowerShell solution blocks IP addresses that are trying to brute force your SQL Server logins, by blocking IP addresses in Windows Defender Firewall with Advanced Security, using PowerShell. You can use this to create your own solution to block offending IP addresses in SQL Server’s firewall.
Windows Defender: Turn off routine remediation
Here is how to (temporarily) turn off routine remediation in Windows Defender Antivirus (WinDefend). During the transition of antivirus software to Windows Defender Antivirus (WinDefend), I don’t want Windows Defender remediation on threats it might find. Later, when I have more information about potential threats, I can always choose to remediate that threat, e.g. quarantaine or remove it.
Increase WMI memory to support large volume of queries
WMI stopped working: WmiPrvse.exe would just crash after hitting some memory limit of 512 MB. If you run into the same issue with Windows Management Instrumentation, here is how you can increase WMI Provider Service’s memory quota. Doing so resolved my issues. Here is how to optimize WMI.
Install and setup IIS Manager for Remote Administration in Windows Server IIS (step by step)
Install IIS Manager in Windows 10 and Windows 11. Learn how to install and configure IIS Manager (InetMgr) for Remote Administration of your Windows Server IIS web server, in Windows 11/10. You can use IIS Manager to administer various components of your website through a graphical user interface (GUI), if it’s hosted in IIS. This post also shows how to install IIS Web Management Service (WMSVC) on Server Core using PowerShell.
Getting more out your Windows Performance Counters monitoring for web applications – part 3
This is part 3 about Zabbix monitoring for your websites and ASP.NET applications in IIS. This time I’ll show you how to get data from Win32_PerfRawData_PerfProc_Process counter, fast, for everey application pool This counter is notorious for its slowness, but you can get data a bit faster. IIS AppPool Insights in Zabbix – because there is always more than one way.