diff --git a/Examples/Example-14-ListingGPOsHashtable.ps1 b/Examples/Example-14-ListingGPOsHashtable.ps1 new file mode 100644 index 0000000..871d788 --- /dev/null +++ b/Examples/Example-14-ListingGPOsHashtable.ps1 @@ -0,0 +1,5 @@ +Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force + +$SummaryHashtable = Get-GPOZaurrLink -AsHashTable -Summary +$SummaryHashtable | Format-Table -AutoSize +$SummaryHashtable[5] \ No newline at end of file diff --git a/Examples/Example-14-ListingGPOsPerOU3.ps1 b/Examples/Example-14-ListingGPOsPerOU3.ps1 index 0b9ab79..8a40fad 100644 --- a/Examples/Example-14-ListingGPOsPerOU3.ps1 +++ b/Examples/Example-14-ListingGPOsPerOU3.ps1 @@ -1,6 +1,7 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force -Get-ADOrganizationalUnit -Filter * -Properties distinguishedName, LinkedGroupPolicyObjects | Get-GPOZaurrLink | Format-Table -Get-ADOrganizationalUnit -Filter * -Properties canonicalname, distinguishedName, LinkedGroupPolicyObjects | Get-GPOZaurrLink | Format-Table +# gpLink is required property. While LinkedGroupPolicyObjects does work it doesn't contain information about enabled/enforced GPO +Get-ADOrganizationalUnit -Filter * -Properties distinguishedName, LinkedGroupPolicyObjects, gpLink | Get-GPOZaurrLink | Format-Table +Get-ADOrganizationalUnit -Filter * -Properties canonicalname, distinguishedName, LinkedGroupPolicyObjects, gpLink | Get-GPOZaurrLink | Format-Table Get-ADObject -Filter * -Properties distinguishedName, gplink -Server 'ad.evotec.pl' | Get-GPOZaurrLink | Format-Table -AutoSize Get-GPOZaurrLink | Format-Table -AutoSize \ No newline at end of file diff --git a/Examples/Example-14-ListingGPOsPerSite.ps1 b/Examples/Example-14-ListingGPOsPerSite.ps1 new file mode 100644 index 0000000..0d387b8 --- /dev/null +++ b/Examples/Example-14-ListingGPOsPerSite.ps1 @@ -0,0 +1,3 @@ +Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force + +Get-GPOZaurrLink -Linked Site | Format-Table -AutoSize * \ No newline at end of file diff --git a/Examples/Example-14-ListingGPOsSummary.ps1 b/Examples/Example-14-ListingGPOsSummary.ps1 new file mode 100644 index 0000000..7b6b197 --- /dev/null +++ b/Examples/Example-14-ListingGPOsSummary.ps1 @@ -0,0 +1,8 @@ +Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force + +$Summary = Get-GPOZaurrLink -Summary +$Summary | Format-Table -AutoSize * + +$OneGPO = $Summary | Where-Object { $_.DisplayName -eq 'ALL | Enable RDP' } +$OneGPO.Links +$OneGPO.LinksObjects | Format-Table * \ No newline at end of file