powershell set-adcomputer netbootguid

时间:2012-11-09 15:19:17

标签: powershell active-directory

快速提问。我想更新活动目录计算机对象的netbootguid。以下虽然似乎不起作用。

Set-ADComputer -identity $someComputerName -add@{'netbootGUID' = $theguidhere}

其中$guid = "00000000-0000-0000-0000-001CC082A15C" #a mac地址

我收到以下错误:

Set-ADComputer : A value for the attribute was not in the acceptable range of values

知道我做错了什么以及如何纠正它?

1 个答案:

答案 0 :(得分:1)

尝试声明$guid的类型(我现在无法测试):

[guid]$guid = "00000000-0000-0000-0000-001CC082A15C"

并尝试:

Set-ADComputer -identity $someComputerName -add@{'netbootGUID' = $guid.tobytearray()