# Define registry paths
$regPath1 = "HKLM:\SOFTWARE\Microsoft\Provisioning\Diagnostics\AutoPilot"
$regPath2 = "HKLM:\SOFTWARE\Microsoft\Provisioning\AutopilotPolicyCache"
# Check first path
if (Test-Path $regPath1) {
$values1 = Get-ItemProperty -Path $regPath1
Write-Output "From Diagnostics\AutoPilot:"
Write-Output "Tenant ID: $($values1.CloudAssignedTenantID)"
Write-Output "Tenant Domain: $($values1.CloudAssignedTenantDomain)"
} else {
Write-Output "Registry path not found: $regPath1"
}
# Check second path
if (Test-Path $regPath2) {
$values2 = Get-ItemProperty -Path $regPath2
Write-Output "From AutopilotPolicyCache:"
Write-Output "Tenant ID: $($values2.CloudAssignedTenantID)"
Write-Output "Tenant Domain: $($values2.CloudAssignedTenantDomain)"
} else {
Write-Output "Registry path not found: $regPath2"
}
Comments
0 B
|👍
/👎