Can someone please help me with my Powershell script. I’m a total noob and am trying to basically create an account (which is fine on it’s own), but cannot seem to be able to attach the Get-ADUser onto the end properly.
Here’s what I’ve got, obviously I have populated everything with random and incorrect entries just for the sake of privacy, but I know it works when it’s populated properly so that’s all good:
dsadd user "cn=Johnny Wheeler,ou=,dc=,dc=" -tel 1234567 -email blah -title "blah" -office blah -desc "blah" -company blah -upn J.Wheeler -display "Johnny.Wheeler" -pwd P455W0rd$123 -mustchpwd no -canchpwd no -pwdneverexpires yes -disabled no Get-ADUser -Identity "Jim Jones" -Properties member of | Select-Object -ExpandProperty member of | Add-ADGroupMember -Members J.Wheeler
I am just trying to get it to copy group permissions, etc from an existing user at the end of the script, but need to do so under the same script piece.
Cheers, Billy
submitted by /u/billypick
[link] [comments]
The post Get-ADUser appeared first on How to Code .NET.