Powershell Script to add users from CSV & then copy the users changed passwords to echo on other Servers


attention ms technet, here's supper user power shell question:

in linux there way have users change password on 1 box , can echo out , copy "while pw hashed / encrypted" other servers.

is there way in power shell 2.0 in windows 2008 r2 same thing? as mentioned in other questions, have 30+ windows 2008 r2 servers , need way to:
1. put in 10-20 local users & password changed access remote desktop on servers
2. have users change password on 1 server , have ability export password while encrypted copy on other servers

so users won't have change password on each server

thanks in advance help; need week please help.  again these stand alone boxes no active directory, no domain, set workgroup

any feedback appreciated,

rob

 


rob jung adrweb

try bing 2 article:
http://blogs.technet.com/b/heyscriptingguy/archive/2010/11/23/use-powershell-to-create-local-user-accounts.aspx
http://blogs.technet.com/b/heyscriptingguy/archive/2010/11/25/use-powershell-to-add-local-users-to-local-groups.aspx

for example:

$computer = "srv"    import-csv p:\test.txt -delimiter ";" | %{    $objou = [adsi]"winnt://$computer"  $objuser = $objou.create("user", $_.username)  $objuser.setpassword($_.password)  $objuser.setinfo()  $objuser.fullname = "$($_.firstname) $($_.lastname)"  $objuser.setinfo()      $objgroup = [adsi]"winnt://ad/$computer/użytkownicy pulpitu zdalnego"  $objgroup.add("winnt://$computer/$($objuser.name)")    }    

 




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client