AsBuiltReport / AsBuiltReport.Microsoft.AD

Repository for AsBuiltReport Microsoft Active Directory module
https://techmyth.blog/posts/homelab-ad-doc-using-asbuiltreport/
MIT License
63 stars 18 forks source link

Improve GPO Table(s) #128

Closed kennyparsons closed 1 year ago

kennyparsons commented 1 year ago

Description

Currently, it's only possible to see if a GPO is linked by looking at the OU table. It would be great if any of the Informational levels (1-3) added a column (info 1) or row (info 2-3) for the linkage.

Here is an example of info 3:

3-missing linkage

I would be great if the linkage could be added as a row here. In info 1, it would be a 4th column.

At minimum, it would we need a count of the number of targets the GPO is linked to (or a boolean: if ($count -eq 0) .... This is accomplished with something like this:

$dom='AD.EXAMPLE.CO<'
$GPOS=(Get-GPO -Domain $dom -All)
$GPOS | ForEach-Object { $name = $_; $count= @(((Get-GPLink -Domain $dom | Where-Object DisplayName -eq $name).Target).count); Write-Output "$name,$count"}

The above is a quick and dirty example, but it gets the point across.

We could expand on this for info 2-3. When this info level is used, each individual table for each GPO would include the actual targets, not just the count (or boolean).

desired

Additional Context

No response

Before submitting

rebelinux commented 1 year ago

If I understood correctly,

  1. You need a column in InfoLevel1 that counts the number of times the gpo is linked to an organizational unit?

  2. And in InfoLevel 2/3, you need the list of OU to which the gpo is linked?

Regards,

kennyparsons commented 1 year ago

Correct. Thank you

rebelinux commented 1 year ago

image

rebelinux commented 1 year ago

image