locked
Add Users in Remote Desktop User Group in a Remote PC RRS feed

  • Question

  • Dear Scripting Guy,

    Good Day,

    Is there any way of adding a domain user in "Remote Desktop User Group" on a remote PC?

    Thank You

    Regards

    Abdul Wajid

    • Moved by Bill_Stewart Tuesday, March 25, 2014 3:37 PM Abandoned
    Sunday, November 24, 2013 12:36 PM

Answers

  • Something like this

    $computer=$env:computername
    $user = "user_to_be_added"
    $domain = "yourdomain"
    $Group = "Remote Desktop Users"
    ([ADSI]"WinNT://$computer/$Group,group").psbase.Invoke("Add",([ADSI]"WinNT://$domain/$user").path)


    Gastone Canali >http://www.armadillo.it

    Se alcuni post rispondono al tuo quesito(non necessariamente i miei), ricorda di contrassegnarli come risposta e non dimenticare di contrassegnare anche i post utili. GRAZIE! Ricorda di dare un occhio ai link Click Here andHere


    • Proposed as answer by GastoneCanali Saturday, November 30, 2013 11:58 AM
    • Edited by GastoneCanali Tuesday, March 25, 2014 4:23 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:59 PM
    Sunday, November 24, 2013 9:53 PM
  • Ye s- there is a module in the Gallery that has many functions for managing local accounts and groups.  It is svery good and pretty much solves most issues.  I believe is built only on WMI and ADSI.

    ¯\_(ツ)_/¯

    • Proposed as answer by Just Karl Friday, February 20, 2015 8:59 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:59 PM
    Sunday, November 24, 2013 10:06 PM

All replies

  • Is there any way of adding a domain user in "Remote Desktop User Group" on a remote PC?
    Yes - by logging in with Remote Desktop under an account that is already registered.
    Sunday, November 24, 2013 12:49 PM
  • Thank you  for the answer, I want to know a way using powershell.
    Sunday, November 24, 2013 4:01 PM
  • Dear Scripting Guy,

    Good Day,

    Is there any way of adding a domain user in "Remote Desktop User Group" on a remote PC?

    Thank You

    Regards

    Abdul Wajid

    Group Policy "Restricted Groups"

    You can also use ADSI (Look in Gallery for scripts)


    ¯\_(ツ)_/¯

    Sunday, November 24, 2013 4:12 PM
  • Thank you  for the answer, I want to know a way using powershell.
    Since there are several methods to achieve your aim, it would be useful to mention the word "Powershell" in your original post.
    Sunday, November 24, 2013 4:56 PM
  • Something like this

    $computer=$env:computername
    $user = "user_to_be_added"
    $domain = "yourdomain"
    $Group = "Remote Desktop Users"
    ([ADSI]"WinNT://$computer/$Group,group").psbase.Invoke("Add",([ADSI]"WinNT://$domain/$user").path)


    Gastone Canali >http://www.armadillo.it

    Se alcuni post rispondono al tuo quesito(non necessariamente i miei), ricorda di contrassegnarli come risposta e non dimenticare di contrassegnare anche i post utili. GRAZIE! Ricorda di dare un occhio ai link Click Here andHere


    • Proposed as answer by GastoneCanali Saturday, November 30, 2013 11:58 AM
    • Edited by GastoneCanali Tuesday, March 25, 2014 4:23 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:59 PM
    Sunday, November 24, 2013 9:53 PM
  • Ye s- there is a module in the Gallery that has many functions for managing local accounts and groups.  It is svery good and pretty much solves most issues.  I believe is built only on WMI and ADSI.

    ¯\_(ツ)_/¯

    • Proposed as answer by Just Karl Friday, February 20, 2015 8:59 PM
    • Marked as answer by Just Karl Friday, February 20, 2015 8:59 PM
    Sunday, November 24, 2013 10:06 PM