Forum Discussion
Get-aduser is not working in PS7 if i am trying to filter user using attribute Whencreated.
- May 09, 2024
Hi, Vasil.
This is in relation to the on-premise ActiveDirectory module, not any Azure modules.
Your post is somewhat confusing since your example uses "-ge" yet the error reports "-gt". Even so, I've tried both under PowerShell 7.4.2 and cannot reproduce the issue.
Can you please check your example in this post is accurate?
Also, check both the module and (optionally) the command to ensure it's not coming from an alternate installation.
Verifying commandlet(s):
Verifying modules(s):
Cheers,
Lain
Hi, Vasil.
This is in relation to the on-premise ActiveDirectory module, not any Azure modules.
Your post is somewhat confusing since your example uses "-ge" yet the error reports "-gt". Even so, I've tried both under PowerShell 7.4.2 and cannot reproduce the issue.
Can you please check your example in this post is accurate?
Also, check both the module and (optionally) the command to ensure it's not coming from an alternate installation.
Verifying commandlet(s):
Verifying modules(s):
Cheers,
Lain
Hello LainRobertson ,
I ran commands as suggested by you. My AD module is different that could be an issue here.
- LainRobertsonMay 10, 2024Silver Contributor
Hi, Imad.
That path suggests the ActiveDirectory module you're seeing may be being imported as a remote session, which may explain the shown error - which is different again to the two previous errors.
What do you see if you run the command below?
If you see the a module with a path like the one above beginning with C:\Windows\system32\WindowsPowerShell, then that's the module you want to make use of, not the one from your screenshot.
Cheers,
Lain