r/PowerShell • u/scotharkins • May 01 '26
get-adprincipalGroupMembership requires seloaddriverprivilege priv - why?
When I run Get-ADPrincipalGroupMembership I get a simple failure:
Get-ADPrincipalGroupMembership: An unspecified error has occurredIn the Windows Security log I see an audit failure from Get-ADPrincipalGroupMembership for the privilege "SeLoadDriverPrivilege".
This privilege is recognized as one that is commonly requested in cases where it is not required. This leads me to the question of why Get-ADPrincipalGroupMembership alone among the few AD Toolkit commands I use requires the privilege.
Thanks!
4
Upvotes
4
u/BlackV May 01 '26
are you running that command on the domain controller?
3
u/omglazrgunpewpew May 01 '26
That audit might just be a side effect of where/how it’s running, especially if it's directly on a DC, as I think u/BlackV was alluding to, or in a session with elevated/sec sensitive context. The cmdlet should be doing AD/GC lookups, def not loading drivers.
I’d test from an RSAT/admin workstation if you haven’t already, and point it at a known good GC:
If that works, treat the privilege audit as a side quest and start looking at GC discovery, ADWS, or the specific DC/session the module is landing on.
1
u/ryoumaskuy May 06 '26
Ran into something similar, the SeLoadDriverPrivilege audit hit is almost certainly a red herring, likely, a WMI or ADWS backend quirk rather than an actual requirement of the cmdlet itself. Worth running whoami /priv in your session and checking whether a filtered admin token is the real culprit. That said, switching to an LDAP query via adsisearcher sidesteps the whole mess and performs better at scale anyway, so it's where we landed.
2
u/[deleted] May 01 '26
[removed] — view removed comment