Get-GPO:当前安全上下文未与 Active Directory 域或林相关联

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

无法 运行 在 Powershell ISE 上获取 GPO 错误来了: Get-GPO:当前安全上下文未与 Active Directory 域或林关联。 有人可以帮忙吗??

您当前的用户不是您运行查询所针对的域的成员。尝试使用该域的域用户。 来自get-gpodocumentation

[...] 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).