HP Sure Recover User Manual
4
使用 HP Client Management Script Library 
(CMSL)
HP Client Management Script Library 可以讓您透過 PowerShell 管理 HP Sure Recover 設定。以下範例指令
碼展示如何佈建、確定狀態、變更設定及解除佈建 HP Sure Recover。
附註:有一些指令超出了本指南的行長度,但必須輸入為一行。
$ErrorActionPreference = "Stop"
$path = 'C:\test_keys'
$ekpw = ""
$skpw = ""
Get-HPSecurePlatformState
try {
 Write-host 'Provisioning Endorsement Key'
 $p = New-HPSecurePlatformEndorsementKeyProvisioningPayload `
 -EndorsementKeyPassword $ekpw `
 -EndorsementKeyFile "$path\kek.pfx"
 $p | Set-HPSecurePLatformPayload
 Start-Sleep -Seconds 3
 Write-host 'Provisioning signing key'
 $p = New-HPSecurePlatformSigningKeyProvisioningPayload `
 -EndorsementKeyPassword $ekpw `
 -EndorsementKeyFile "$path\kek.pfx" `
 -SigningKeyFile "$path\sk.pfx" 
 $p | Set-HPSecurePLatformPayload 
11










