Dear all,
Recently I've add new DC to infrastructure (in the same way like other DC's). Cause it is the closest DC for me very often I am using it to for Powershell with ADModule jobs to do.
What is strange: (Tested on Powershell with AD module run normally and as an administrator) I am logged to this particular DC which have problem.
Get-ADUser -Filter * -Properties gidNumber, uidNumber -SearchBase "Path" | ft gidNumber, uidNumber
I've got as result no value for these parameters. So I decrease scope of filter to only one user
Get-ADUser -Filter 'samAccountName -eq "username"' -Properties gidNumber, uidNumber -SearchBase "Path" | ft gidNumber, uidNumber
Still no result
Doing the same commands but with switch -server
Get-ADUser -Filter 'samAccountName -eq "username"' -server otherdc.domain.com -Properties gidNumber, uidNumber -SearchBase "Path" | ft gidNumber, uidNumber
I am getting results as I expect.
When I am login to other DC and do the first two commands I've got result as I expect.
Funny is that if I am going to this problematic DC and looking for this info via console Active Directory Users and Computer (connected do problematic dc) -> user -> attributeEditor I can see values which I am looking for :)
Other strange thing is that if I am connecting from other server with Powershell with AD Module and doing the command like before with switch to problematic server I got proper values.
I think it may be related somehow with UAC but it should not appear when I start PS as Admin.
Second strange thing on this DC is that sometime when I trying to do some Set-commands as return I got info about insufficient rights to perform this operation (I mean when I am doing it directly from machine) but If I will use switch -server otherdc.domain.com
everything works :):)
ExecutivePolicy is set to Unrestricted. Account which I am using is a domain Admin,
Do you have any idea of strange behaviour of Powershell on this DC? Maybe I forgot about something?
Thank you in advance,
BR,
Sebastian,