PowerShell How-To


Understanding Background Jobs in PowerShell

Synchronous code execution is fine for small scripts, but for more time-consuming scripts, consider running your code in the background as a job. Here's how.

Working with PowerShell History

Using these three commands, PowerShell allows you to read and manipulate just about every aspect of your command history.

Building a Wait-Action Function in PowerShell

The next time you need to wait on a step in your script, don't just add a delay. Instead, use a Wait-Action function to wait just the right amount of time.

How To Set an IP Address with PowerShell

Changing network adapter properties can be a chore the more machines you have, and the more numbers you have to punch in. Script out the process, instead.

How To Create and Invoke Your First DSC Configuration in Azure

Using Azure Automation DSC gives administrators the same benefits of PowerShell DSC, but with some bonus tooling.

Ensuring a Clean PowerShell Session for Your Pester Tests

It's important to start tests with a clean session, especially when writing unit tests and creating mocks. Here's how to run Pester tests in a completely new PowerShell process.

Filtering Command Output in PowerShell

In which Adam demonstrates the truth in the old PowerShell adage: "The more you can limit the number of objects returned to the pipeline, the faster you code will run."

PowerShell Pester Test Design: Best Practices

The Pester PowerShell module allows for some flexibility in how tests are written, but as Adam notes, there are still a few key points to consider.

How To Reset an Azure VM Admin Password with PowerShell

Using Azure's "virtual machine agent," you can reset the local administrator password without even hitting the Windows OS itself. Here's how.

How To Process Multiple CSV Files at Once in PowerShell

Since CSVs are so easy to work with, it doesn't take long to organize and process large sets of data.

Using Parameters in your Pester Test Scripts

Save time for accounting for changes in your scripts with this handy tip.

Using a Stopwatch In PowerShell

Monitoring the speed at which code is executed will give a window into avenues to improve it for efficiency.

How To Create Arrays for Performance in PowerShell

Is your script taking too long to execute? Speed it up with this handy tip.

How To Create Virtual Directories in Azure Web Apps with PowerShell

Until Microsoft adds a native command that easily connects virtual directories to Azure Web apps, we're going to have to do it ourselves.

Creating an SSIS Catalog with PowerShell

Here's how to deploy SQL Servers in an organization with custom business intelligence.

SharePoint Watch

Sign up for our newsletter.

I agree to this site's Privacy Policy.