PowerShell Cheatsheet

This is a simple reference so I can remember commands and snippets for PowerShell.

Common Commands

# Print PS version
$PSVersionTable.PSVersion
 
# List modules
Get-Module -ListAvailable
Get-Module -ListAvailable Az*  // Modules starting with Az
 
# Reload PowerShell profile
. $profile

List PowerShell’s Environmental Variables

Reference

Get-Childitem -Path Env:* | Sort-Object Name