Author: Not specified Language: powershell
Description: Not specified Timestamp: 2017-07-16 22:41:24 +0000
View raw paste Reply
  1. $User = Get-ADuser hpaddon
  2.  
  3. DistinguishedName : CN=Sean Vucich,OU=Users,OU=Sky Users,DC=skytv,DC=co,DC=nz
  4. Enabled           : True
  5. GivenName         : Sean
  6. Name              : Sean Vucich
  7. ObjectClass       : user
  8. ObjectGUID        : 5db03110-76ad-4238-a765-a44935350b75
  9. SamAccountName    : sean.vucich
  10. SID               : S-1-5-21-147744769-188169282-316617838-52863
  11. Surname           : Vucich
  12. UserPrincipalName : sean.vucich@skytv.co.nz
  13.  
  14. Get-AdUser $User | Set-AdUser ($user.GivenName+'.'+$user.Surname+'@skytv.co.nz')
View raw paste Reply