You can use PowerShell to install Windows Updates automatically, unattended and simple. Neat, right? For this, you don’t have to have an enterprise environment with WSUS, or Windows Server, but since this is Sysadmins of the North, I assume you do. In this post I’m going to show you how to install Windows Updates with PowerShell and the PSWindowsUpdate module.
Send email with PowerShell
Easily send your DevOps reporting by email with this PowerShell function, because the Send-MailMessage cmdlet is obsolete. Of course you’ll be using StartTLS and authenticated SMTP as additional security.
Are you in my blocklist?
Recently, Jeff Starr wrote about blocking IP addresses posting random string comment spam. That post reminded me about my own older post about blocking WordPress comment spammers manually. With just a few manual steps, you create your own little blocklist for WordPress in either a
web.config file. Here are the IP addresses I’m currently blocking. Note, this list can get long (loooonnggg).
Create an additional SQL Server Login
Sometimes you need to create an additional SQL Server Login (user) for your database (databases). Here is a small T-SQL snippet that creates such a login for contained databases in SQL Server and adds memberships.
Monitor SQL Server and databases in depth using Zabbix
Keeping your SQL Server and databases in top shape is key for a good performing SQL Server database server and its databases. A good performing server makes happy customers, and that’s what puts bread on the plank, right? In this post I’ll show you how you can use Windows Performance counters, PowerShell and Zabbix for in depth monitoring of your SQL Server server and SQL databases.
Query all WordPress posts in MySQL not having a Yoast SEO meta description
If you just started using Yoast SEO it’s sometimes nice to know which posts don’t have a meta description yet. Knowing this, you can add the description which is good for your SEO results. Here is a query you can use to query all posts in WordPress not having a Yoast SEO meta description yet. You can run this on your MySQL prompt or in phpMyAdmin.
Configure Windows Debugging Symbols in WinDbg
Before you can properly debug crash and memory dumps in Windows (Windows 11, Windows 10, Windows Server), you need to install WinDbg -Windows Debugger- and its debugging symbols. In this article I explain how to set up these debugging symbols for WinDbg in Windows.
Extract files from an MSI package
Windows has the ability to allow the MSI package (.msi file) contents to be extracted using the command line or via a script. I keep forgetting the correct msiexec syntaxis to use to extract files from an .msi file (MSI package), so here is a short post with the command.
Connect to a KVM host through an ssh tunnel and arbitrary port in Windows 11 and WSL 2
If you need to connect virt-manager to a KVM host over ssh in Windows, then Windows 11 and WSL 2 made things a whole lot easier for you. Even if you need to connect virt-manager through an ssh tunnel and arbitrary port because your network is reachable only through a bastion host with ssh key authentication. Here is how.
Windows 11/10 and WSL 2 DevOps environment
In this post I describe some of the settings and changes I made to make my Windows 10 and Ubuntu WSL into a fully fledged development environment. Here are the settings and tools I use for DevOps/SysOps on Windows.
YubiKey support in OpenSSH for Windows 11 and Windows 10
Since Win32-OpenSSH version 184.108.40.206p1-Beta there is decent support for FIDO/U2F hardware authenticators. This means we can use a YubiKey with Windows 11 and Windows 10, w00h00! In this post, I’ll show you how to install Microsoft OpenSSH client in Windows 11 and Windows 10, and how to configure your YubiKey. If you follow this guide and all goes well, you no longer need additional tools like Git Bash or MremoteNG/MobaXterm.
How to display longer username in `ps`
Have you ever had the need to show the full username in
ps output? Here is how. Normally in Bash, the
ps output truncates an username to 7 characters and a
+ sign, e.g IUSR_60+. In cases when you absolutely need the full username in ps, this can be pretty annoying. Here is how to display longer usernames in ps:
Monitor .NET CLR Garbage Collected heap from your web application
Are you worried about your .NET webapp running out of memory? In order to let your .NET (web) application run smooth over a longer period of time, it is important to monitor the .NET CLR Garbage Collector (GC) and collection. The what? The .NET Common Language Runtime Garbage Collector. Here is how you can monitor this in a Zabbix template using Powershell WMI / CIM and Win32_PerfRawData_NETFramework_NETCLRMemory Windows Performance Counters.
Quickly check EnableTrailerSupport isn’t set in your network for http.sys (CVE-2022-21907)
If you want to find out fast if your IIS webservers have EnableTrailerSupport enabled for https.sys in the registry, here is a small PowerShell method. All you have to do is set the correct SearchBase.
Convert SqlCe database to SQL Server
How can I convert an SqlCe database to Microsoft SQL Server? Now the SQL Server Compact (SQL CE) database type is unsupported, it’s recommended by Microsoft to upgrade to SQL Server. But how do you convert your SqlCe database? I’ll explain in this article, read on.