Adding user to to administrators group

Welcome Forums General PowerShell Q&A Adding user to to administrators group

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
3 years ago.

  • Author
    Posts
  • #31719

    Participant
    Points: 0
    Rank: Member

    I need help with pshell script to add and remove users from Administrators group.

    Scenario:

    We temporarily grant access to users to built-in administrators group to perform some administrative tasks and remove their access as soon as they are done.

    currently, if I have to grant users access to domain B, what I do is , RDP to the domain_B with my domain_A account as Domain_A account is administrative account, open administrators group and add the user to the group.

  • #31720

    Participant
    Points: 2
    Rank: Member

    Add-ADGroupMember -Identity "some group" -Members "Some User"

    you can do explicit remoting to access AD module for another domain

The topic ‘Adding user to to administrators group’ is closed to new replies.