Get the App
SLTechnology News&Howtos  ›  Servers  › 

AD- finds the user Get-User that meets the specified criteria

Shulou Source: shulou.com Published: 2022-06-02 15:29:00 10月03日 Update

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

Tags: Users comments multilines information content commands characters servers departments services conditions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info vpn Docker NVidia