SEHC
asked on
PowerShell Set-ADUser
Hi
I am trying to set up the command to Set-ADUser via the users employeeID and to add a comment in to the extensionAttribute. I am hoping someone can help I looked at the MS site but I think I am missing something here.
Set-ADUser -EmployeeID "12345" -extensionAttribute12 "1235"
I am trying to set up the command to Set-ADUser via the users employeeID and to add a comment in to the extensionAttribute. I am hoping someone can help I looked at the MS site but I think I am missing something here.
Set-ADUser -EmployeeID "12345" -extensionAttribute12 "1235"
Try this:
set-aduser -identity "12345" -add @{extensionAttribute12='12 35' }
set-aduser -identity "12345" -add @{extensionAttribute12='12
ASKER
Set-Mailbox -Identity "12345" -ExtensionCustomAttribute1 2 @{Add="12345"}
the Identity in the command line is username not employeeID as I want to use that as the lookup for the user.
the Identity in the command line is username not employeeID as I want to use that as the lookup for the user.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
that did not work??
First try the Get-ADUser with filter, without the pipeline. That shows whether there is an object found:
Get-ADUser -Filter {EmployeeID -eq '12345'}
Does that return an user?
ASKER
Get-ADUser -Filter {EmployeeID -eq '12345'} works after I add the Pipe it does nothing
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Set-Mailbox -Identity "12345" -ExtensionCustomAttribute1
you need to use Set-QADUser instead.