workgroup account management problem

Welcome Forums General PowerShell Q&A workgroup account management problem

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years ago.

  • Author
  • #5822

    Points: 0
    Rank: Member

    by testmanps at 2013-04-19 01:44:33

    I can add user account at local machine's administrators group,the code like this:

    PS C:\> [ADSI]$server="WinNT://mypc"
    PS C:\> $testuser=$server.Create("User","testuser")
    PS C:\> $testuser.SetPassword("abc")
    PS C:\> $testuser.SetInfo()
    PS C:\> [ADSI]$group="WinNT://mypc/Administrators,Group"
    PS C:\> $group.Add($testuser.path)

    but how can i use a script to add user account from machine a,to b,c by powershell v2??

    BTW: i know b,c 's administrator password. i don't use Enter-PSSession comlet.

    thx DonJ!

    by happysysadm at 2013-04-19 01:49:48

    Hi, you already asked this ang got an answer: viewtopic.php?f=29&t=1796&p=7960#p7960

The topic ‘workgroup account management problem’ is closed to new replies.