I like to get information form specific users where a vaulue is prwesent in de Notes field of a ADUser object.
In this specific case the following text is added to the Notes field .
The users are all using a specific mail format, so I filter the users on that mail item.
Only I cannot find out yet, how to retrieve only the items that has a 1 or to specific text in thias notes field.Z
For now I use:
$User = import-csv .\Output\file.csv
Foreach ($account in $USER.NAME){
$info = get-aduser $account -Properties Displayname, Info, Name |where {$_.info -contains "CHG0037167" -or $_.info -contains "CHG0037896" }
}
Unfortunately this gives me all the users in that email domain, with or without the text in the Notes field.