积极答复者
powershell查找bitlocker恢复密钥时报错

问题
-
以下是命令:
PS C:\Users\admin>Get-ADObject -SearchBase $Computer.distinguishedname -Filter {objectclass -eq 'msFVE-RecoveryInformation'} -Properties msfve-recoverypassword
Get-ADObject : Cannot validate argument on parameter 'SearchBase'. The argument is null. Provide a valid value for the argument, and then try running the command again.
At line:1 char:26
+ Get-ADObject -SearchBase $Computer.distinguishedname -Filter {objectclass -eq 'm ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-ADObject], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.ActiveDirectory.Management.Commands.GetADObje
ctDC是server 2008R2 sp1,客户端是win7 ent x64 sp1, powershell版本为v4
在technet的另一个页面看到有人用这个命令并且成功输出了结果:
- 已编辑 Linjie Huang 2017年8月17日 2:03
答案
-
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已编辑 Candy LuoMicrosoft contingent staff 2017年8月28日 6:32
- 已建议为答案 Candy LuoMicrosoft contingent staff 2017年9月12日 7:20
- 已标记为答案 Linjie Huang 2017年11月1日 1:53
全部回复
-
您好 Linjie Huang,
>>Get-ADObject : Cannot validate argument on parameter 'SearchBase'. The argument is null.
提示参数为空,请您检查是否赋值的$Computer的参数正确:
示例:
> $computer = Get-ADComputer -Filter {Name -eq 'WIN10'} > $BitLockerObjects = Get-ADObject -Filter {objectclass -eq 'msFVE-RecoveryInformation'} -SearchBase $computer.DistinguishedName Properties 'msFVE-RecoveryPassword'
检查域环境中是否有win7这台计算机,例如以下示例,AD中并没有win100这台机器,此时运行命令就会得到参数为空的报错:
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
您好 Linjie Huang,
目前问题有什么新的进展吗?
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已编辑 Candy LuoMicrosoft contingent staff 2017年8月28日 6:32
- 已建议为答案 Candy LuoMicrosoft contingent staff 2017年9月12日 7:20
- 已标记为答案 Linjie Huang 2017年11月1日 1:53
-
您好 Linjie Huang,
目前问题有什么新的进展吗?
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.