PowerShell How-To


Set Up an Azure File Share Used as a Mounted Drive

Setting up a place to store files in the cloud isn't quite as easy as doing it on-prem. That's where Microsoft's Azure Files service comes in.

Creating an Azure SQL Database with PowerShell

When you need a SQL database fast, the cloud is the best way to go. Azure provides a SQL database as a PaaS that eliminates the need to get an entire SQL Server deployment up and running.

Creating a VHD from a Physical Computer with Disk2vhd

Disk2Vhd is a little Microsoft utility that does one thing and one thing well: convert physical computers to virtual disks.

Installing a Module from the PowerShell Gallery

For the longest time, the open source community had a concept called "public package repositories." Microsoft never had the same -- until the PowerShell Gallery.

Uploading a PowerShell Gallery Module Directly to Azure Automation

Azure Automation can be an excellent PowerShell script orchestration tool, though it has just a limited number of PowerShell modules. Luckily, we can upload our own modules, too.

Building Your First Azure Automation Runbook

In today's IT organizations, it's critical for system admins to know how to automate processes. Luckily, we have tools like Azure Automation to help us out.

How To Find and Use PowerShell History To Save Time

By using the various history commands in PowerShell, you can search for and easily execute any command that you have previously run in the same session.

How To Replace Text in a File with PowerShell

Whether the string you're looking for inside a text file is a single word or a complicated pattern, PowerShell has the ability to find and replace just about anything.

How To Transfer Files via SCP with PowerShell

Native support for Secure Copy Protocol (SCP) isn't in PowerShell, but that doesn't mean it's not capable.

How To Format PowerShell Output with Format-Table

You may not think too often about how text is displayed in your PowerShell console, but under the covers, there's quite a bit going on.

The Evolution of a PowerShell Function Parameter

Making code adaptable is a key skill for any coder. Here's a primer on how to stretch function parameters to fit a variety of situations.

Using a Custom Enum To Get Tab-Completion on a Parameter

Sometimes using ValidateSet isn't enough -- for instance, when you have multiple functions with the same parameter that you need to perform a task on.

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.

Most   Popular