Group policy using powershell on a non domain joined machine

Kayak404 21 Reputation points

I'm trying to use PowerShell to set group policy on a number of non domain joined PCs running Windows 10 Professional.

I have installed RSAT: Group Policy Management Tools but when using the get-GPO cmdlet the following error occurs:

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

Is there a method to use get-GPO and other associated cmdlets to just use the local computer?


A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,091 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,183 questions
0 comments No comments
{count} votes

Accepted answer
  1. Thameur-BOURBITA 17,661 Reputation points


    If the machines is Workgroup , you have to use gpedit.msc to edit the local GPO. There is no Powershell module to manage local GPO therefore you cannot Powershell to edit local GPO.

    Please don't forget to mark helpful reply as answer

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rich Matheisen 43,076 Reputation points

    GPO's are domain-based and can't be used on non-domain members.

    You can, however, have local policies.