PowerShell scripting for Windows automation, cmdlets, and administration. Use for .ps1 files.
A task-based command-line shell and scripting language built on .NET.
$name = "World"
Write-Host "Hello, $name!"
$processes = Get-Process | Where-Object { $_.CPU -gt 10 }
foreach ($p in $processes) {
Write-Output $p.Name
}
Lightweight commands used in the PowerShell environment (Verb-Noun structure).
Get-ProcessNew-ItemSet-LocationPowerShell pipes Objects, not text.
Get-Service | Select-Object -Property Name, Status
Passes objects from one cmdlet to the next.
Do:
Try/Catch for error handling[CmdletBinding()] for advanced functionsWrite-Output over Write-Host)Don't: