Updating which registry tree to query

This commit is contained in:
silversword411 2021-07-07 16:00:48 -04:00
parent 3f5cb5d61c
commit 36fd203a88
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ if (!$ErrorCount -eq 0) {
}
$imagePath = (Get-Item -Path HKLM:\SYSTEM\ControlSet001\Services\$serviceName).GetValue('ImagePath')
$imagePath = (Get-Item -Path HKLM:\SYSTEM\CurrentControlSet\Services\$serviceName).GetValue('ImagePath')
$imagePath2 = ($imagePath -split "&s=")[1]
$machineGUID = ($imagePath2 -split "&k=")[0]
Write-Output $machineGUID