我听不太懂一块PowerShell脚本我的我一起工作:PowerShell的“ResumeState”它做什么
import-module "C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.IdentityManagement.PowerShell.Cmdlet.dll"
$connector = "\\SERVERNAME\root\MicrosoftIdentityIntegrationServer:MIIS_ManagementAgent.Name=\"contoso.com\""
$profile = "full import"
$resumeStatus = $connector.ResumeState($profile)
什么是最后一行?我有没有在任何地方ResumeState
声明,谷歌并没有显示出任何结果这是一个关键字或PowerShell的功能
您发布的'$ connector'变量是一个字符串。字符串没有'ResumeState'方法。我想你可能会错过'[WMI]'类型加速器。 (我也会说你应该从你的帖子中删除服务器名称。) –
你为什么不问问谁写的? –
@Bill_Stewart:我认为你是对的,它是WMI类型。服务器名称是模拟 - 我发布之前更改它,但谢谢:)我想将此端口移到.net,我不知道如何做到这一点。有什么建议么? – Lenny