I don't understand the NewNotImplementedException runtime error I'm getting I don't understand the NewNotImplementedException runtime error I'm getting powershell powershell

I don't understand the NewNotImplementedException runtime error I'm getting


As far as I can read in Microsoft documention Set-AdServerSettings is not part of ActiveDirectory module but is an Exchange CmdLet.

Using Exchange Management Shell Commands With Managed Code article show the code you have to write to use Set-AdServerSettings CmdLet in C#.


Remote Runspace constructor doesn't initialize and use InitialSessionState object. It works only with Local runspaces.