如何在 Azure 窗口 10 更新 1809 虚拟机中启用 TPM 自动预配



我有 azure 虚拟机(Windows 10 更新 1809,VM 大小为标准 D2s v3(2 个 vcpu,8 GB 内存((,其中使用 TPM 使用设备预配服务为 iotedge 开发解决方案。无法使用启用 TPM 自动预配电源外壳命令自动预配。

在 azure 虚拟机中打开了以管理员身份运行的电源外壳(窗口 10 更新 1809(,在 powershell 中运行启用 TPM 自动预配命令

PS C:Usersdev> Enable-TpmAutoProvisioning

收到下面给出的错误消息

TpmPresent                : False
TpmReady                  : False
ManufacturerId            : 0
ManufacturerIdTxt         :
ManufacturerVersion       :
ManufacturerVersionFull20 :
ManagedAuthLevel          : Full
OwnerAuth                 :
OwnerClearDisabled        : True
AutoProvisioning          : NotDefined
LockedOut                 : False
LockoutHealTime           :
LockoutCount              :
LockoutMax                :
SelfTest                  :

PS C:Usersdev> TpmReady           : False
TpmReady : The term 'TpmReady' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ TpmReady           : False
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (TpmReady:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
PS C:Usersdev> TpmPresent         : True
TpmPresent : The term 'TpmPresent' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ TpmPresent         : True
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (TpmPresent:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
PS C:Usersdev> ManagedAuthLevel   : Full
ManagedAuthLevel : The term 'ManagedAuthLevel' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ ManagedAuthLevel   : Full
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (ManagedAuthLevel:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
PS C:Usersdev> OwnerAuth          : OwnerClearDisabled : True
OwnerAuth : The term 'OwnerAuth' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ OwnerAuth          : OwnerClearDisabled : True
+ ~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (OwnerAuth:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
PS C:Usersdev> AutoProvisioning   : Enabled
AutoProvisioning : The term 'AutoProvisioning' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ AutoProvisioning   : Enabled
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (AutoProvisioning:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
PS C:Usersdev> LockedOut          : False
LockedOut : The term 'LockedOut' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ LockedOut          : False
+ ~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (LockedOut:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
PS C:Usersdev> SelfTest           : {191, 191, 245, 191...}
At line:1 char:43
+ SelfTest           : {191, 191, 245, 191...}
+                                           ~
You must provide a value expression following the '..' operator.
At line:1 char:43
+ SelfTest           : {191, 191, 245, 191...}
+                                           ~
Unexpected token '.' in expression or statement.
At line:1 char:43
+ SelfTest           : {191, 191, 245, 191...}
+                                           ~
Missing expression after '.' in pipeline element.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ExpectedValueExpression
PS C:Usersdev>

In Azure virtual machine(Windows 10 update 1809), After running 
PS C:Usersdev> Enable-TpmAutoProvisioning
output should be
TpmPresent                : True
TpmReady                  : True
ManufacturerId            : 1229346816
ManufacturerIdTxt         : IFX
ManufacturerVersion       : 7.63
ManufacturerVersionFull20 : 7.63.13.6400
ManagedAuthLevel          : Full
OwnerAuth                 :
OwnerClearDisabled        : False
AutoProvisioning          : Enabled
LockedOut                 : False
LockoutHealTime           : 10 minutes
LockoutCount              : 0
LockoutMax                : 31
SelfTest                  : {}

错误消息不是因为Enable-TpmAutoProvisioning命令。您似乎在命令末尾粘贴了一些额外的文本。请确保正确运行该命令。

例如:

PS C:Usersdev> TpmReady           : False
TpmReady : The term 'TpmReady' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ TpmReady           : False
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (TpmReady:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

您似乎在电源外壳窗口中错误地粘贴了PS C:Usersdev> TpmReady : False

请运行Enable-TpmAutoProvisioning

最新更新