In this post I showed you how you can use PowerShell to install Windows Updates. Quickly and silently. This makes the use of PSWindowsUpdate module perfect for your day to day automation. The module even supports scheduling (on remote computers too!), it has the ability to search WSUS and Windows Update for updates, scheduling and performing the download and installation of updates.
Category: Code base
Code base for PowerShell scripting, PHP, ASP/VBScript, ASP.NET/C#, ASP.NET Core, Perl, code snippets and examples. Snippets are small pieces of reusable code.
Send email with PowerShell
In this post I provide you with a small PowerShell function you can use to send email over a TLS secured SMTP connection with SMTP authentication. As a framework you can use in your own scripting and extend it. You can even create a PowerShell module of it.

Emulate ternary operator in PowerShell
Emulate ternary or conditional operator in PowerShell 5. It takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy. This operator is frequently used as an alternative to an if…else statement.
Removing phantom application folders from website configuration in IIS
how to remove phantom application folders from websites in IIS using PowerShell? Today I wanted to remove application folders from the website configuration in IIS whose physical path on the filesystem was removed. E.g when the application folder “/test1” in the website example.com should point to z:\sites\example.com\www\test1 but was removed. Here is now.
Use -SearchBase with Get-ADComputer for faster results
Using -SeachBase with PowerShell’s Get-ADComputer cmdlet gives faster results when querying Active Directory Domain Services (AD DS) with PowerShell. You can use this for your own advantage, here is a little example to speed up AD DS queries.

Install Windows Server Servicing Stack Updates (SSU) using PowerShell
Install Servicing Stack Updates (SSU) for Windows Server 2012R2, 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.
How to uninstall and remove Adobe Flash Player in Windows Server
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.
ASP and ASP.NET connection string examples for Microsoft SQL Server and MySQL
This article provides you with a couple of ASP.NET to SQL Server connection string examples for ODBC and OLE DB. And as a bonus for ASP to SQL Server, MySQL, and SSL encrypted connections too.
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).
Working with file attributes in PowerShell
Here is how to use Get-Item and Get-ItemProperty in PowerShell to perform and streamline day to day tasks like installing or updating software based on file versions. Working with PowerShell’s Get-ItemProperty to get file attributes may boost your work productivity. It’s often easier to getting things done if you have a more generic way of doing something. I also address changing timestamps on files in short.
How to use SSL in PHP Data Objects (PDO) mysql
Connect securely to your MySQL database using PHP Data Objects (PDO); Here is how to connect to MySQL with PHP PDO using an SSL encrypted connection.
Fatal error: Uncaught Error: [] operator not supported for strings – PHP 7.1
With PHP 7.1, some PHP web applications fail because of deprecated code usage. This may result in an error message like [] operator not supported for strings for various Joomla, WordPress and Drupal components. Here’s how to fix this code for PHP 7.1+.
How to unzip a file in PowerShell
Unzipping a file on your PowerShell command line may come in handy sometimes, even on your Windows 10 workstation. Use Expand-Archive for this
How to determine if a SQL Server backup is compressed?
Compressed SQL Server backups can be verified in PowerShell using a handy PowerShell function. This comes in handy when you need to verify if existing SQL Server backups are compressed.
How to detect ethernet network speed in Windows
Detect the ethernet network speed using PowerShell or WMI is perfect for Windows Server Core. If you ever need to lookup the speed of your ethernet network card in Windows, on the command-line, use one of the following WMIC commands on your PowerShell prompt