File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5642,13 +5642,13 @@ function Get-NetFileServer {
5642
5642
}
5643
5643
}
5644
5644
}
5645
-
5646
- Get-NetUser - Domain $Domain - DomainController $DomainController - Credential $Credential - PageSize $PageSize | Where-Object {$_ } | Where-Object {
5645
+ $filter = " (!(userAccountControl:1.2.840.113556.1.4.803:=2))(|(scriptpath=*)(homedirectory=*)(profilepath=*)) "
5646
+ Get-NetUser - Domain $Domain - DomainController $DomainController - Credential $Credential - PageSize $PageSize - Filter $filter | Where-Object {$_ } | Where-Object {
5647
5647
# filter for any target users
5648
5648
if ($TargetUsers ) {
5649
5649
$TargetUsers -Match $_.samAccountName
5650
5650
}
5651
- else { $True }
5651
+ else { $True }
5652
5652
} | ForEach-Object {
5653
5653
# split out every potential file server path
5654
5654
if ($_.homedirectory ) {
You can’t perform that action at this time.
0 commit comments