10 lines
655 B
PowerShell
10 lines
655 B
PowerShell
$certificateBlob = # Create a public key certificate blob in Base64 format.
|
|
$publicKeyManagementServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_PublicKeyManagementService WHERE Name='Intel(r) AMT Public Key Management Service'")
|
|
$inputCertificate = $publicKeyManagementServiceRef.CreateMethodInput("AddCertificate")
|
|
$inputCertificate.AddProperty("CertificateBlob", $certificateBlob)
|
|
$outputObject = $publicKeyManagementServiceRef.InvokeMethod($inputCertificate)
|
|
$returnValue = $outputObject.GetProperty("ReturnValue")
|
|
if($returnValue -like "0")
|
|
{
|
|
$publicKeyCertificateRef = $outputObject.GetProperty("CreatedCertificate").Ref
|
|
} |