Sysadmins of the North
Share now!

Use -SearchBase with Get-ADComputer for faster results

This might be specific to my Windows Server environment and PoSH scripting, but using -SeachBase with PowerShell’s Get-ADComputer gives me faster results. You can use this for your own advantage, here is a little example to speed up AD DS queries.

Continue reading

Install Windows Server Servicing Stack Updates (SSU) using PowerShell

You can install Servicing Stack Updates (SSU) for Windows Server 2016 and Windows Server 2019 using PowerShell, without downtime. Because they must be installed prior to your normal Windows Server security updates, you can install them anytime you want to during the day. Here’s a small PowerShell example to do so.

Continue reading

Security baseline for Windows 10 v1903 and Windows Server v1903 – final release

Microsoft is pleased to announce the final release of the security configuration baseline settings for Windows 10 version 1903 (a.k.a., “19H1”), and for Windows Server version 1903.

Continue reading

Automatically flush Redis cache after publishing a WordPress post

In a previous post I explained that clearing PHP opcode caches before WordPress Updates helps in streamlining the update process. WordPress updates no longer fail because of cached file locations. Did you know you can automatically flush opcode caches like Redis when you publishing a post or page in WordPress? Doing so ensures you and your visitors see the newly created content immediately.

Continue reading

Setting up Monit monitoring in Windows Subsystem for Linux WSL

A couple of years ago, I wrote a blog article about setting up Monit monitoring on an Ubuntu VM on Hyper-V. Now it’s time to do the same, but then in Windows Subsystem for Linux, or WSL. So, without further ado, here is how to install and configure Monit monitoring in Windows 10 WSL.

Continue reading

How to verify SMBv1 is disabled in Windows and Windows Server

Since WannaCry and Petya ransomware were spreading through Windows systems in 2017, it’s recommended to have Server Message Block version 1 (SMBv1) disabled in Windows clients and Windows Server. Now SMBv1 is not installed by default in Windows 10 1709 and Windows Server, version 1709 and later, but how can you be sure it is disabled in older Windows versions? Easy, use PowerShell.

Continue reading

Silently import .reg file in your Windows registry

To add a .reg file silently to your Windows registry, you can use the regedit command. As almost always, the /s parameter is for silent and /q for quiet.

Continue reading

How to uninstall and remove Adobe Flash Player in Windows Server

Ever wondered why Windows Server Update Services (WSUS) offers Flash updates for Windows Server? Adobe Flash Player is installed on Windows Server 2016 / 2019 if you have the Remote Desktop Session Host (RDSH) role installed. Yikes! I can imagine you want to delete Adobe Flash Player without deleting the RDSH role, and here is how.

Continue reading
Umbraco Project Belle

11+ Tips to optimize Umbraco CMS

Umbraco is a popular, ASP.NET powered, content management system (CMS). Even though it performs pretty well, here are 11+ tips to optimize the performance of Umbraco powered websites on IIS.

Continue reading
Security?

WordPress .htaccess security best practices in Apache 2.4.6+

Apache Access Control done right, ‘Allow/Deny from all’ versus ‘Require All Granted/Denied’

Since Apache 2.4.6, a new module is used to configure and set up access control for websites: mod_authz_core. This means you have to use a different syntax for allowing or blocking hosts and IP addresses to your website. But unfortunately, old documentation is never updated and people even still write blog posts using that old syntax, leaving you with an unprotected website. Not what you had in mind, now is it?…

Continue reading

How to set SVN_EDITOR environment variable in Windows Server

On a newly installed workstation or server, you might encountered the following subversion error when you commit a change:

Continue reading
File cabinet image

Manually fail-over all databases in an SQL Server Database Mirroring configuration

How to manually fail-over an SQL Server database mirroring session?

How to manual fail-over mirrored SQL Server databases using Transact-SQL (T-SQL) in SQL Server 2017+. This canĀ only be initiated from the principal server, and theĀ mirrored database must be synchronized (that is, when the database is in the SYNCHRONIZED state). In this article I’ll show you how to force a fail-over.

Continue reading

ASP and ASP.NET connection string examples for Microsoft SQL Server and MySQL

A connection string is sometimes a bit obscure. Do I need ODBC or OLE DB? When you need one and Google for it, you often find old ones that either don’t work at all anymore, or are not optimal. This article provides you with a couple of ASP.NET to SQL Server connection string examples, and as a bonus for ASP to MySQL too.

Continue reading

Start all stopped application pools that have Autostart set to true

Just a quicky: Start all stopped application pools in IIS that have the autostart property set to true. Easily with appcmd or the IISAppPool cmdlet that’s available in the IISAdministration PowerShell module. And here is how.

Continue reading

MySQL Connector/ODBC C# test script

Whenever you need to test your ASP.NET connection to your MySQL database, using ODBC, you can use the following C# test script. Currently it uses MySQL ODBC 8.0 Unicode Driver, but you can easily change the version used. As a bonus it prints some connection information and it requires an SSL connection to your MySQL database (SslMode=REQUIRED).

Continue reading
1 2 3 19
Skip to content