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 @@ -5653,13 +5653,13 @@ function Get-NetFileServer {
5653
5653
}
5654
5654
}
5655
5655
}
5656
-
5657
- Get-NetUser - Domain $Domain - DomainController $DomainController - Credential $Credential - PageSize $PageSize | Where-Object {$_ } | Where-Object {
5656
+ $filter = " (!(userAccountControl:1.2.840.113556.1.4.803:=2))(|(scriptpath=*)(homedirectory=*)(profilepath=*)) "
5657
+ Get-NetUser - Domain $Domain - DomainController $DomainController - Credential $Credential - PageSize $PageSize - Filter $filter | Where-Object {$_ } | Where-Object {
5658
5658
# filter for any target users
5659
5659
if ($TargetUsers ) {
5660
5660
$TargetUsers -Match $_.samAccountName
5661
5661
}
5662
- else { $True }
5662
+ else { $True }
5663
5663
} | ForEach-Object {
5664
5664
# split out every potential file server path
5665
5665
if ($_.homedirectory ) {
You can’t perform that action at this time.
0 commit comments