Viewing information about a GPO

Information about the GPOs themselves is visible inside the Details tab of GPMC. This same information is also available by using the Get-GPO cmdlet in PowerShell. In the following screenshot, I have issued a simple Get-GPO MyNewGPO command which displays for me the same information that would be present if we opened GPMC and visited the Details tab of MyNewGPO:

While it's cool to be able to query this information inside PowerShell, it becomes powerful when you realize that you can just as easily pull this same information for ALL of the GPOs in your domain:

Get-GPO -ALL

This command presents me with pages and pages and pages of information, because even in this simple test lab environment, I have created quite a number of GPOs as we progressed through these chapters. While this command gave me some good data output, it's a bit overwhelming. Perhaps instead of spitting out all of the information about each GPO, I would rather just see a quick list of all the GPOs in my domain. Here, we will use a pipe in order to format the output of the Get-GPO command, and filter it down to showing us only the DisplayName field for each GPO. Now that's some data that I can get excited about:

Get-GPO -ALL | select DisplayName

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.86.255