```powershell Get-Command Get-Help Get-Command Get-Help Get-Command -Online Get-Command New-SmbShare | Select-Object Name Get-Command New-SmbShare | Format-List Get-Command *Smb* New-Guid New-Guid | Write-Host New-Guid | ForEach { $_.Guid } | clip ``` Enabling scripts ```powershell Get-ExecutionPolicy Set-ExecutionPolicy RemoteSigned # allows local scripts ``` ## Strings, Patterns, Wildcards ```powershell Get-ChildItem -Path "C:\Windows\*" -Filter *.exe Get-ChildItem -Path "C:\Windows\*" | Where-Object { $_.Name -Match "^se" } # find files whose names start with "se" ``` the latter is the equivalent of the bash ```bash ls /c/Windows/* | grep ^se ``` ### String Manipulation ```powershell "hello world".Split(" ") # hello, world "hello/world/mr.flibble".Split("[/.]") # hello, world, mr, flibble -- argument to Split is a regex "a/b/c/d".Split("/").Count # 4 ```