Get-GPO : Current security context is not associated with an Active Directory domain or forest

Viewed 1640

Unable to run Get-GPO on Powershell ISE the error comes: Get-GPO: Current security context is not associated with an Active Directory domain or forest. Can someone help??

1 Answers

Your current user is not a member of the domain against which you're running the query. Try using a domain user of that domain. From the get-gpo documentation

[...] If the domain of the user that is running the session (or, for startup and shutdown scripts, the computer) is different that sales.contoso.com, a trust must exist between the two domains. The command retrieves the GPO information by contacting the PDC (in the sales.contoso.com domain).

Related