powershell - Transfer Users groups in AD with an audit trail -


i need copy users groups anothers , have audit trail.

this code have:

#this user name of account want copy.   $old = read-host  #this user account want copy to.  $new = read-host  get-adprincipalgroupmembership $old | set-adprincipalgroupmembership $new |   export-csv "pathhere" -notypeinformation  

this code thought might work

#this user name of account want copy.   $old = read-host  #this user account want copy to.  $new = read-host  get-adprincipalgroupmembership $uold | set-adprincipalgroupmembership $new |   export-csv "pathhere" -notypeinformation  

i have no idea need complete should simple command in powershell.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -