PowerShell X vs Y
Windows PowerShell 5.1 and PowerShell 7: shell, scripting language and the base of Microsoft 365 administration.All PowerShell pages
- Invoke-WebRequest vs Invoke-RestMethod: which one to use in PowerShellInvoke-RestMethod parses JSON or XML into objects, made for APIs. Invoke-WebRequest returns the raw response with its status code, headers and content.
- Where-Object vs .Where(): filtering collections in PowerShellWhere-Object filters a pipeline item by item; .Where() filters a collection already in memory, is faster, and has First, Last, SkipUntil and Split modes.