Forum Discussion

John Cilluffo's avatar
John Cilluffo
Copper Contributor
Oct 22, 2019

Adding Network Service account (hostname$) to a security group via powershell

Hi Team,

 

Would anyone know how you can add hostname$ via powershell to a security group?

 

Greatly appreciate the help

 

Thank you

  • Kevin_Morgan's avatar
    Kevin_Morgan
    Iron Contributor

    John Cilluffo 

     

    If you looking to add in Active Directory security group, you can use the below command.

    ADD-ADGroupMember "SecurityGroup" –members "hostname$"

     

Resources