Hello
I created a script and tested it from my workstation, only to find that some expected return values no longer worked when running it on the DC.
The values that come up missing are EmployeeID and EmployeeNumber (employeeType doesn't work properly either, but I am not interested in it for this script). To test, I went to Powershell and ran commands individually.
I am running as a service account, so did my testing as that service account from both my workstation and the DC. The script and the manual commands all work on the workstation and fail on the DC.
First to run in the context of the service account:
Start-Process powershell.exe -Credential "Domain\ServiceAccount"
This opens a new window where I enter the command that I am having issues with:
Get-ADUser Bob.Smith -Properties * | fl Name,Employee*
On the workstation (and on a member server), it returns:
Name : Bob Smith
EmployeeID : 123456
EmployeeNumber : 987643
EmployeeType : Employee
On the DC, it returns (NOTE - employeeType doesn't return at all):
Name : Bob Smith
EmployeeID :
EmployeeNumber :
Any ideas are appreciated!
Thanks
UPDATE NOTE: I also tested on a member server and the results are the same as the workstation, so the issue appears to be isolated to the DC- Edited by Tim-KGS Friday, August 28, 2015 4:24 PM add test note