Get shared folder informations on a remote host

This script gets the shared folder informations and ACL configured on a remote host (source : http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/1903cfde-ad34-464e-9419-94d07ed9de88/) Script : Function Get-NtfsRights($name,$path,$comp){ $path = [regex]::Escape($path) $share = “\\$comp\$name” $path = $path -replace “\\ “,” ” $path $wmi = gwmi Win32_LogicalFileSecuritySetting -filter