Searching for all mailboxes  beginning by ST and having 4 characters in ALIAS

Daoust ICT
Daoust ICT used Ask the Experts™
on
Dear,
Searching for all mailbox  beginning by ST and having 4 characters in ALIAS


Of course when I user get-mailbox "ST*" I got the mailboxes but also other mailbox that I do not need.
Any idea about the simple command ?

Many tks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Systems Engineer
Commented:
get-mailbox st* | ? {$_.alias -match "^\w\w\w\w$"}

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial