Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 1.74 KB

File metadata and controls

59 lines (46 loc) · 1.74 KB

PowerShell Command Cheatsheet

Quick reference for cmdlets used across this library.

General

Command Description
Get-Help <Cmdlet> Display cmdlet help
Get-Command *keyword* Search available commands
Get-Module -ListAvailable List installed modules

Windows Local Admin

Command Description
Get-Service List services
Get-Process List running processes
Get-Volume List disk volumes
Get-CimInstance Win32_OperatingSystem OS information
Get-WinEvent -LogName System Read event logs

Active Directory

Command Description
Get-ADUser -Filter * List users
Get-ADGroup -Filter * List groups
Get-ADComputer -Filter * List computers
Search-ADAccount -LockedOut Find locked accounts

VMware (PowerCLI)

Command Description
Connect-VIServer Connect to vCenter
Get-VM List virtual machines
Get-Datastore List datastores
Get-Snapshot -VM <Name> List VM snapshots

Azure (Az Module)

Command Description
Connect-AzAccount Sign in to Azure
Get-AzResourceGroup List resource groups
Get-AzVM List virtual machines
Get-AzVirtualNetwork List virtual networks
Get-AzStorageAccount List storage accounts

AZ-305 Architecture Topics

Command Description
Get-AzPolicyAssignment View policy assignments
Get-AzRoleAssignment View RBAC assignments
Get-AzAvailabilitySet List availability sets
Get-AzRecoveryServicesVault List backup/DR vaults
Get-AzConsumptionUsageDetail Review cost usage