- PS Version: PowerShell 7+
- OS Version: Windows Server 2016
Objective: I would like to use PowerShell to get the permissions of an AD schema object without the need of the Active Directory PsDrive / PsProvider.
The Active Directory PsProvider that comes with the AD Module does not work with PowerShell 7+ on Windows Server 2016 from my testing. This MS documentation also touches on that. Because that PsProvider is needed to create/use an Active Directory PsDrive, you can't access AD objects like this AD:\. Using this method is typically what I prefer. Below is an example of exactly what I need except I'm using Windows PowerShell and not PowerShell 7+.
This gets the configuration schema permissions:
(Get-Acl "AD:$((Get-ADRootDSE).schemaNamingContext)").Access
An example of the distinguished name for that object:
CN=Schema,CN=Configuration,DC=my,DC=domain,DC=com
With the limitations outlined, what other options within PowerShell 7+ can I use to access those permissions?
