Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Get Unlinked GPOs from trusted domains

$
0
0

Hello,

I have a list of 72 domains that I need to find which GPOs are unlinked in each of those domains. I have the below code but only returns the domain to which i'm logged into:

Import-ModuleGroupPolicy

 

 

 

Get-GPO

 

 

 

-All

|

 

 

 

%

{

 

 

 

If ( $_|Get-GPOReport-ReportTypeXml|Select-String-NotMatch"<LinksTo>"

)

{

 

 

 

Write-Host$_.

DisplayName

Any help much appreciated.

 

Regards,

Gordon


Viewing all articles
Browse latest Browse all 6937

Trending Articles