none
How do you create GMSA account via C# RRS feed

  • Question

  • I can create the GMSA accounts via the powershell cmdlet New-ADServiceAccount but looking for piece of code that will allow creation of GMSA accounts via C#. Any help is greatly appreciated.

    Jawad

    Monday, March 25, 2019 4:03 PM

Answers


  • Hi   Jawad Butt,

    Unfortunately, we didn't find that we can create an GMSA accounts via C# directly, you may can try to run PowerShell scripts/cmd  to create an GMSA accounts.

    You can refer the following articles.

    Adding and invoking commands

    How to run PowerShell scripts from C#

    If you have any question about Windows PowerShell, please go to the Windows PowerShell forum for getting suitable help.


    Best Regards

    Yong Lu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jawad Butt Tuesday, April 2, 2019 2:13 AM
    Wednesday, March 27, 2019 10:05 AM
    Moderator

All replies


  • Hi   Jawad Butt,

    Unfortunately, we didn't find that we can create an GMSA accounts via C# directly, you may can try to run PowerShell scripts/cmd  to create an GMSA accounts.

    You can refer the following articles.

    Adding and invoking commands

    How to run PowerShell scripts from C#

    If you have any question about Windows PowerShell, please go to the Windows PowerShell forum for getting suitable help.


    Best Regards

    Yong Lu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jawad Butt Tuesday, April 2, 2019 2:13 AM
    Wednesday, March 27, 2019 10:05 AM
    Moderator
  • I already have the powershell code being executed.. was looking for something within the Directory Services. Thank you for your reply.

    Jawad

    Tuesday, April 2, 2019 2:13 AM