You are here: Saotn.org » PowerShell

PowerShell

PowerShell Tag Archive

How to add, list and remove IP addresses in Windows Firewall

Yesterday, I showed you how to block IP addresses in Windows Firewall using PowerShell. This comes in particularly handy when blocking brute-force IP addresses. In this short post I’ll show you how to bulk add IP addresses in Windows Firewall, list an IP address and how to remove all IP addresses from Windows Defender Firewall with Advanced Security.

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. For the time being, some manual labor is involved, but it is still manageable. 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

Long story short: 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. Unfortunately, there is no PowerShell cmdlet to configure this. Here is how to (temporarily) turn off routine remediation.

Increase WMI memory to support large volume of queries

How to optimize WMI performance and memory usage in Windows Server

Since I started expanding my Zabbix scripts and templates for monitoring Windows Server instances – AD, IIS and SQL Server – I found WMI was failing more and more. 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.

Getting more out your Windows Performance Counters monitoring for web applications – part 3

IIS AppPool Insights in Zabbix – because there is always more than one way

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.

ASP.NET web application monitoring in Zabbix, part 2

When you host multiple websites in IIS, and you need to monitor them, Zabbix is one of your options. In Zabbix, you can take advantage of Windows Servers performance counters using perf_counter and perf_counter_en. In this article, I’ll show you some important Windows performance counters to monitor your ASP.NET web application in Zabbix

Monitor IIS application pools in Zabbix, part 1

Microsoft Windows Server IIS monitoring with Zabbix

Zabbix can harnas the powers of WMI (Windows Management Instrumentation) to query the Windows system for data. In Zabbix you use wmi.getall for this. Here is a small introduction to query the number of running w3wp.exe processes per application pool in Zabbix. In this example I’ll be using a Plesk server running IIS 10.0.

Microsoft OpenSSH SSH Server Properties screen

Manually install OpenSSH in Windows Server

How to install OpenSSH Server in Windows Server 2019 Core using PowerShell, or Windows Server 2016

OpenSSH is an ideal and secure way of performing remote maintenance & administration on your servers. Even on Windows Server! :) Microsoft have released their OpenSSH port for Windows Server and Windows 10 back in 2015. Here is how to install the OpenSSH Server on Windows Server 2016 and 2019.

Force BITS to download WSUS updates in the foreground in Windows Server

When WSUS downloads are slow

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.

source code WordPress security plugin

Find vulnerable WordPress plugin versions fast using PowerShell

On a daily bases, new vulnerabilities are found in WordPress plugins. And when you host thousands of WordPress sites, you can count on the fact you have some customers using that vulnerable version of that particular plugin. So you need to find those vulnerable versions on your servers fast. On Windows Server, PowerShell is a perfect tool for the job!