{"id":"cea8fed4-79cf-45c0-9b1b-1727dc918817","task":"Automate Windows Registry reads and writes from PowerShell using the registry provider and item property cmdlets","domain":"learn.microsoft.com","steps":["Navigate the registry like a filesystem: Set-Location HKCU:\\Software\\MyApp — HKLM:\\ and HKCU:\\ are the two built-in PSDrive roots.","Read a value: Get-ItemProperty -Path 'HKCU:\\Software\\MyApp' -Name 'Version'","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'","Update an existing value: Set-ItemProperty -Path 'HKCU:\\Software\\MyApp' -Name 'Version' -Value '2.0'","Remove a value: Remove-ItemProperty -Path 'HKCU:\\Software\\MyApp' -Name 'Version'; remove an entire key: Remove-Item -Path 'HKCU:\\Software\\MyApp' -Recurse"],"gotchas":["Writing to HKLM:\\ requires an elevated (Administrator) PowerShell session; HKCU:\\ is writable by the current user without elevation.","Use New-ItemProperty to create a value that does not yet exist, and Set-ItemProperty to modify one that does; using Set-ItemProperty on a nonexistent value returns an error.","Property types in PowerShell (String, DWord, QWord, Binary, MultiString, ExpandString) correspond to REG_SZ, REG_DWORD, etc.; choose the correct type or applications may misread the value."],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:33.807Z"},"url":"https://mcp.waymark.network/r/cea8fed4-79cf-45c0-9b1b-1727dc918817"}