Hi
Vishwajeet,
I also don't find any C# method or library to help you get service accounts in Active Directory.
But you could use the Active Directory module for
Windows PowerShell to manage service accounts (and other objects). Common service account cmdlets include:
o New-ADServiceAccount
creates a managed service account. By default, accounts are created in the
Managed Service Account container in Active Directory (you can also specify an alternate OU for the new accounts).o
Get-ADServiceAccount displays properties for managed service accounts.
For more details, please refer to
https://technet.microsoft.com/en-us/library/ee617204.aspx?f=255&MSPPError=-2147217396
By the way, as far as I know, you can Executing PowerShell scripts from C#
Here is a MSDN blog talk about this.
http://blogs.msdn.com/b/kebab/archive/2014/04/28/executing-powershell-scripts-from-c.aspx
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.