Get-AdUser -Filter 'name -nolike "sam*" '
$users = Import-Csv - Path C:\scripts\adlist.csv
foreach ($user in $users) {
get-aduser -filter * | where {$_.GivenName -notcontains $user}
(get-aduser -filter * | where {$_.name -notmatch "^(Kim |SQL |Mich|CRM |Mike)"}).Name
In this case Kim Smith (that is, Kim starting at the beginning of the string and followed by a literal space) will not show up in the results. Whereas kimmy jones and Kimberly Smith will.
get-aduser -filter * -properties * | {$._UserName -notlike "user1" -and $_.UserName -notlike "*user2"}