In preparation of moving away from Win 2003, I've been asked to compare ACLs on two servers with identical directory structures. I came up with the following:
function Compare-ACLs { Param( [string]$Path1 = "Path1", [string]$Path2 = "Path2" ) $folders_path1 = gci -Directory $Path1 -Force | get-acl $folders_path2 = gci -Directory $Path2 -force | get-acl compare-object $folders_path1 $folders_path2 -IncludeEqual }
However, when I run it I get an output that is giving me the object type:
InputObject SideIndicator ----------- ------------- System.Security.AccessControl.DirectorySecurity == System.Security.AccessControl.DirectorySecurity == System.Security.AccessControl.DirectorySecurity == System.Security.AccessControl.DirectorySecurity == System.Security.AccessControl.DirectorySecurity == System.Security.AccessControl.DirectorySecurity ==
Is there a way for me to show the folder of the InputObject, or is that impossible given get-ACLs limitations?
Than