Get-UserProfiles -ExcludeNTAccount is not excluding

V. 3.9.3
Using the following:
$Profiles = Get-UserProfiles -ExcludeNTAccount @('NT SERVICE\SplunkForwarder',"$envComputerName\Admin","$envComputerName\classic","$envComputerName\altiris","$envComputerName\new","$($LoggedOnUserSessions.DomainName)\AltirisDSsvc")

All excluded items are NOT excluded and are contained in $Profiles.
The only way I can remove the unwanted is to remove them after with:
$Profiles = $Profiles|Where-Object{$_.NTAccount -inotmatch 'altirisdssvc'}, etc.
Ideas?

1 Like

If you can, wait for 3.9.4. I think the Get-UserProfiles function is getting updated.

If you can’t report the problem here.

Updated to 3.10 and this is still an issue unfortunately.

There was a bug opened for this very issue.

But it was closed as it couldn’t be reproduced.

If you can reproduce it on a few computers, consider re-opening the issue

1 Like