I am trying to use the GroupPolicy PowerShell module to manipulate and read local group policy settings on a standalone Windows 2012R2 server.
When I try to execute the
Get-GPOReport -All -ReportType Xml
I get the following error:
Get-GPOReport : Current security context is not associated with an Active Directory domain or forest. At line:1 char:1
+ Get-GPOReport -ReportType Xml -all
+ CategoryInfo : NotSpecified: (:) [Get-GPOReport], ActiveDirectoryOperationException
+ FullyQualifiedErrorId : System.DirectoryServices.ActiveDirectory.ActiveDirectoryOperationException,Microsoft.GroupPolicy.Commands.GetGpoReportCommand
I've also tried specifying my server name as well:
Get-GPOReport -ReportType Xml -all -server devserver01
But I get the same error.
I am logged in as
Administrator on this server whilst running these commands. I also have the Group Policy Management Console installed which is a pre-requisite.
The error message:
Current security context is not associated with an Active Directory domain or forest.
Suggests I should be logged in as a Domain user, but as I mentioned this is a standalone server that is not part of an AD domain.
Is it not possible to use the GroupPolicy module cmdlets on a standalone server?