PowerShell cmdlets follow a consistent Verb-Noun syntax structure, making them intuitive and predictable.
Common verbs:
Syntax structure:
Verb-Noun -Parameter Value -Switch
Examples:
Get-Service -Name "Spooler"
Set-Location -Path "C:\Windows"
New-Item -ItemType Directory -Name "TestFolder"
Stop-Process -Name "notepad" -Force
Parameters: Modify cmdlet behavior
Switches: Boolean parameters (present or not)
Pipeline: Cmdlets can be chained using the pipe operator (|)