BetaComing soon — we’re building the modern myITforum. Some features are still in progress.
← Articles

Useful PowerShell patterns for endpoint work

11/10/2026

A few patterns that show up again and again in Intune and ConfigMgr work.

Patterns that pay off

  • Prefer idempotent scripts
  • Log what you change
  • Return clear exit codes

Example

Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* |
  Where-Object { $_.DisplayName } |
  Select-Object DisplayName, DisplayVersion