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):
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.
How to install and configure Hugo for static site development in WSL on Windows 10.
Do you find it too difficult to install Go or Hugo in Windows for your static site development? Have you tried Windows Subsystem for Linux (WSL) 2? Using a default Ubuntu 20.04, it is pretty easy to install Hugo, set up your development environment and configure Hugo to listen on your Ubuntu’s IP address instead of localhost / 127.0.0.1. This makes your Hugo development site accessible for browsers in Windows 10. Neat, right?
In recent days, there are a number of reports about broken Yoast SEO database operations, related to the DeleteDuplicateIndexables function. The PHP function is located in the file
wordpress-seo\src\config\migrations\20200507054848_DeleteDuplicateIndexables.php, and in this post I’ll provide you with a possible fix for this statement. Read on.
Show the number of registered WordPress users in At-a-Glance widget
Often when a WordPress site is compromised, the website owner doesn’t notice anything strange at first. First a lot of users are created, and it’s only later when posts filled with spam are created or existing pages/posts edited. In the time between compromise and creation of spam posts, a website owner might notice an increased number of users. If he has the means to. And that’s what this little plugin does.
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!
Secure wp-content/uploads in Linux Apache and Windows Server IIS
It’s recommended to disallow access to and execution of PHP files in wp-content/uploads folder. Preferably without the use of a security plugin. Blocking access to PHP files in WordPress wp-content/uploads folder is easily achieved with a
.htaccess file on Linux Apache, or
web.config accesssPolicy in Windows Server IIS, and here is how.
Create a random string in Bash easily. You can use this Bash function in your
.bashrc file to generate a random alphanumeric string. This comes in handy when you need to generate a long, secure password for example. Adjust to your needs.
Basic Authentication managed HTTP module for IIS 10 with virtual users support
In my pursuit of a basic authentication alternative in IIS, other than the built-in Basic Authentication module or Helicon Ape, I came across Devbridge AzurePowerTools. It’s apparently one of few HTTP managed modules for IIS that enables HTTP Basic Authentication with support for virtual users.
How to create an IP restrictions allow list for your IIS FTP Server with Powershell.
When you set up a new public facing FTP server in IIS, it is important to properly secure it. Of course there’s authentication and authorization, but in this post I’ll show you how to configure an IP allow list for FTP using PowerShell.