6 lines
588 B
PowerShell

$otpPasswordByHECI = "P@ssw0rd" # The password that was created by the HECI command.
$setupAndConfigurationServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_SetupAndConfigurationService WHERE Name='Intel(r) AMT Setup and Configuration Service'")
$setupAndConfigurationServiceInstance = $setupAndConfigurationServiceRef.Get()
$provisioningServerOTP = $setupAndConfigurationServiceInstance.GetProperty("ProvisioningServerOTP")
$otpAdminPassword = ConvertToBase64 $otpPasswordByHECI
$isValidOTP = if($provisioningServerOTP -like $otpAdminPassword) {$true} else {$false}