Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use a PowerShell Cmdlet to Get Default Group Policies

$
0
0

Summary: Learn how to use a Windows PowerShell cmdlet to receive information about default domain policies.

Hey, Scripting Guy! Question How can I use a Windows PowerShell cmdlet to find information about default group policies in our domain?

                      Hey, Scripting Guy! Answer Use the Get-GPO cmdlet (available from the RSAT tools) and pipe the results to a Where-Object cmdlet. This is required because the Get-GPO cmdlet does not permit the use of wildcards.

Here is an example by using Windows PowerShell 3.0 syntax:

get-gpo -Domain iammred.net -all | where displayname -match 'default'

This example uses Windows PowerShell 2.0 syntax:

get-gpo -Domain iammred.net -all | where { $_.displayname -match 'default'}


Viewing all articles
Browse latest Browse all 3333

Trending Articles