I am trying to disable an exchange mailbox from C# code. Is there any way or API to do so by C#. I have tried with Powershell.
Asked
Active
Viewed 145 times
-1
-
was there any output from Powershell? – jazb Oct 10 '19 at 07:42
-
Possible duplicate of [Unable to run Disable-Mailbox Powershell in C#](https://stackoverflow.com/questions/47474426/unable-to-run-disable-mailbox-powershell-in-c-sharp) – jazb Oct 10 '19 at 07:43
-
It is not clear what code is used for disabling a mailbox. Moreover, there is no output recieved. – Eugene Astafiev Oct 10 '19 at 11:07
-
1@JohnB I solved the problem with your help. Sure it's the duplicate of the link you provided. – Soe Ya Htet Oct 31 '19 at 06:46
1 Answers
1
.Net version of my project is 4.0 and I was using the System.Management.Automation.dll file that support only .Net version 4.5. Now, I changed the ddl file that supports the .Net 4.0 version and it's working now.

Soe Ya Htet
- 21
- 4