Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends

I am executing the Powershell script through C# by using WSManConnectionInfo, I am making remote connection from my local machine to Lync Server and executing the below commands.

using (Pipeline pipe = remoteRunspace.CreatePipeline())
{
Command enableCsUser = new Command("Set-CsUser");
enableCsUser.Parameters.Add("-Identity", "testuser");
enableCsUser.Parameters.Add("-EnterpriseVoiceEnabled", true);
enableCsUser.Parameters.Add("-LineURI", "TEL:+19677777777");
pipe.Commands.Add(enableCsUser);
pipe.Invoke();
}

But i am getting the below errors message at pipe.Invoke()

Error msg: "Active Directory error "-2147016672" occurred while searching for domain controllers in domain "domain.com": "An operations error occurred."

Any body have idea about this issue and hellp me..

Thanking you.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900