flydean icon

Untitled

flydean | PRO | 12/15/25 05:45:11 PM UTC | 0 ⭐ | 15373 👁️ | Never ⏰ | [intune]
PowerShell |

860 B

|

Cybersecurity

|

0 👍

/

0 👎

# 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

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎