Automate Windows Registry reads and writes from PowerShell using the registry provider and item property cmdlets

domain: learn.microsoft.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Navigate the registry like a filesystem: Set-Location HKCU:\Software\MyApp — HKLM:\ and HKCU:\ are the two built-in PSDrive roots.
  2. Read a value: Get-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'Version'
  3. Create a new key and value: New-Item -Path 'HKCU:\Software\MyApp' -Force; New-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'Version' -PropertyType String -Value '1.0'
  4. Update an existing value: Set-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'Version' -Value '2.0'
  5. Remove a value: Remove-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'Version'; remove an entire key: Remove-Item -Path 'HKCU:\Software\MyApp' -Recurse

Known gotchas

Related routes

Automate native Windows application UI using PowerShell and the Windows UI Automation framework
docs.microsoft.com · 6 steps · unrated
Use PowerShell to automate application installs and configure scheduled tasks on Windows
learn.microsoft.com · 5 steps · unrated
Script Windows Registry changes for deployment using reg.exe (reg add/query/export/import) instead of the PowerShell registry provider
learn.microsoft.com · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans