get-psdrive
cd HKLM:\
set-location -path HKLM:\SOFTWARE\Microsoft\WebManagement\Server
Get-childitem
Get-item -path HKLM:\SOFTWARE\Microsoft\WebManagement\Server
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WebManagement\Server" -Name "EnableRemoteManagement" -Value ”1”
Getting Registry Key Values Remotely
Invoke-Command -ComputerName dc01 -ScriptBlock { Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\WebManagement\Server' -Name EnableRemoteManagement}
Editing the Registry Remotely
Enter-PSSession dc02 -Credential afd\gazh
Searching in the Registry
get-childitem -path hkcu:\ -recurse -ErrorAction SilentlyContinue | Where-Object {$_.Name -like "*Network*"}
Editing the Registry
Set-Itemproperty -path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' -Name 'VMware User Process' -value 'C:\Program Files\VMware\VMware Tools\vmtoolsd.exe'
New-Item –Path "HKCU:\dummy" –Name NetwrixKey
New-ItemProperty -Path "HKCU:\dummy\NetwrixKey" -Name "NetwrixParam" -Value ”NetwrixValue” -PropertyType "String"
Remove-ItemProperty -Path "HKCU:\dummy\NetwrixKey" -Name "NetwrixParam"
Remove-Item -Path "HKCU:\dummy\NetwrixKey" -Recurse
Rename-ItemProperty -Path "HKCU:\dummy\NetwrixKey" -Name "NetwrixParam" -NewName "NetwrixNewParam"