在没有任何帮助的情况下,我已经在google的前3页中进行了全面的搜索
我正在尝试在Active Directory用户和计算机的“远程桌面服务”选项卡中远程更新“家庭”和个人资料位置。
这是我的代码:
Invoke-Command -ComputerName $DomainController -Credential $Credentials -ScriptBlock{
$User = [ADSI] "LDAP://CN=Paul Beenis,OU=Staff,DC=domain,DC=local"
$User.psbase.Invokeset("TerminalServicesProfilePath","\\server\_Profile\pbeenis")
$user.psbase.InvokeSet("TerminalServicesHomeDrive", "P:")
$User.psbase.Invokeset("TerminalServicesHomeDirectory","\\server\_Home\pbeenis")
$User.setinfo()
}
这里是例外:
Exception calling "InvokeSet" with "2" argument(s): "Unknown error (0x80005000)"
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
+ PSComputerName : DC03
Exception calling "InvokeSet" with "2" argument(s): "Unknown error (0x80005000)"
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
+ PSComputerName : DC03
Exception calling "InvokeSet" with "2" argument(s): "Unknown error (0x80005000)"
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
+ PSComputerName : DC03
The following exception occurred while retrieving member "setinfo": "Unknown error (0x80005000)"
+ CategoryInfo : NotSpecified: (:) [], ExtendedTypeSystemException
+ FullyQualifiedErrorId : CatchFromBaseGetMember
+ PSComputerName : DC03
有效的方法:
无效的东西