PowerShell

PowerShell Tag Archive

Retrieve SSH public key from Active Directory for SSH authentication

How to configure SSH public key authentication for Windows Server in Active Directory (AD)? If you want to be able to log on to your Windows Servers through Win32 OpenSSH, you can make use of SSH public key authentication through a ~/.ssh/authorized_keys file. But if you have tens (hundreds) of servers and/or users, perhaps it’s …

Retrieve SSH public key from Active Directory for SSH authentication Read More »

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 …

Block brute force attacks on SQL Server, block IP addresses in Windows Firewall using PowerShell Read More »

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 …

Windows Defender: Turn off routine remediation Read More »

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 …

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

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

Emulate ternary operator in PowerShell

Quickly and dirty determine if a condition is true or false in PowerShell 5.1 by emulating the ternary operator. For example when determinering if the server you are servicing is a Windows Server Desktop Experience version or not (and thus Server Core):

Show Buttons
Hide Buttons