PowerShell Snippets — Hub
Ctrl+F: snippet index · external wiki ·
Get-Item·Get-ItemProperty· registry
One command / one scenario per note — not full cmdlet docs. For cmdlet reference see PowerShell Cmdlets. For CMD see Windows CMD - Powershell Commands.
Add new snippets as .md files in this folder and link them below.
📌 Snippets in this folder
| Note | What it does |
|---|---|
| AD Sync - service and miiserver enum | Azure AD Connect Sync — service registry key + miiserver.exe properties |
(Add more files here as you collect commands.)
📌 External references (detailed Windows / PowerShell wikis)
Use these when you need every parameter, syntax variant, or cmdlet you do not have a vault note for yet.
| Resource | Best for | URL |
|---|---|---|
| SS64 PowerShell | Alphabetical cmdlet cheat sheet — closest to a full wiki | ss64.com/ps |
| Microsoft Learn — PowerShell | Official docs, providers, -Path syntax | PowerShell documentation |
| Get-Item | Files, registry keys, certificates | Get-Item (Microsoft) |
| Get-ItemProperty | Registry values, file metadata | Get-ItemProperty (Microsoft) |
| Registry provider | HKLM:\ paths, drives, wildcards | About Registry provider |
| Format-List | -Property * -Force output control | Format-List (Microsoft) |
| Get-Service | Windows services (alternative to registry) | Get-Service (Microsoft) |
Vault deep dives: PowerShell Cmdlets · Registry Hives and Linux Equivalents · Active Directory Cmdlets · gci
📌 Snippet template (new notes)
---
category: windows-commands
summary: One-line description of what the command finds.
tags:
- powershell
- snippet
---
# Title
## Command
\`\`\`powershell
# command here
\`\`\`
## What it does
## When to use (OSCP)
## Related📌 Common snippet patterns
# Registry key object (service config lives here)
Get-Item -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\ServiceName'
# Registry values under a key
Get-ItemProperty -Path 'HKLM:\SOFTWARE\...'
# All properties on a file (version, path, ACL hints)
Get-ItemProperty -Path 'C:\Path\file.exe' | Format-List -Property * -Force
# Service via cmdlet (simpler than registry)
Get-Service -Name ADSync
Get-CimInstance Win32_Service -Filter "Name='ADSync'"