Category Archives: Powershell

Ten Most Useful PowerShell Commands

These are some of the most useful PowerShell commands that can help you automate and manage tasks on your Windows system. With the right knowledge and practice, you can master these commands and take advantage of their full potential.

What is DSC?

Desired State Configuration (DSC) is a configuration management platform in Windows PowerShell that enables you to manage your infrastructure and enforce your desired configuration. It allows you to declaratively specify the configuration of your servers, and then automatically ensures that your servers are in the desired state.

Creating Arrays in Powershell

Arrays are useful in PowerShell because they allow you to store multiple values in a single variable. This can be convenient when you want to pass a group of values to a function, or when you want to manipulate multiple values in a loop.

Powershell Arrays

Using arrays in PowerShell can be a powerful tool for organizing and manipulating data. In this blog post, we will cover the basics of working with arrays in PowerShell, including how to create and access array elements, and how to manipulate arrays using various methods.

Sending Mail from PowerShell

With Send-MailMessage, you can send email from your scripts. This is especially handy when you have some automated processes, say for monitoring. You could have a script that runs via Task Scheduler that checks for disk space utilization, and sends an email if the disk space is below a threshold.

Powershell Background Jobs

In PowerShell, you can use background jobs to run scripts or commands asynchronously, meaning they can run in the background while you continue to work in the console. This can be useful if you have a long-running task that you don’t want to wait for, or if you want to run multiple tasks concurrently.

QFE Patch List with PowerShell

This handy little script will give you a list of recently installed security updates via the Win32_QuickFixEngeering WMI class (watch out for line wrap!).