Does anyone know how to read out registry key values in PowerShell? The equivalent request in CMD can be seen on the picture.
Get-ChildItem is the one to use, and a quickie would be:
If you want to get a specific key value:
$val = (Get-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName').ComputerName
And how to set/edit appropriately https://blogs.technet.microsoft.com/heyscriptingguy/2015/04/02/update-or-add-registry-key-value-with-powershell/
This format, while very similar can also be used:
$username = Get-ItemProperty -path "HKCU:\Volatile Environment"
Which creates an object. The properties can be called using: