AD- finds the user Get-User that meets the specified criteria
The following server is Exchange 2010
Use the Get-User command to find users whose department is IT
Get-User-ResultSize Unlimited |? {$_ .Department-Eq "IT"} | ft Name,Department
Find the specified user whose comments are multi-line content
As shown below: note that the Notes information is multi-line
To use match and (? *) for matching
A character that ends with a head of 2 and ends with a work.
Get-User-ResultSize Unlimited |? {$_ .Notes-match "(? s) ^ 2.* worker $"} | ft Name,Notes