question

Kayak404-4294 avatar image
0 Votes"
Kayak404-4294 asked Thameur-BOURBITA answered

Group policy using powershell on a non domain joined machine

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?

Thanks

windows-server-powershellwindows-group-policy
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thameur-BOURBITA avatar image
0 Votes"
Thameur-BOURBITA answered

Hi,

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered Kayak404-4294 commented

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

You can, however, have local policies.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I should have used the term ‘local policy’, is it possible to use PowerShell to set a local policy as gpedit will do?

0 Votes 0 ·