Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 8719

Return list of samaccounts with length of 3 or less

$
0
0

Hello,

If I run: 

Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize unlimited | select samaccountname

It will out put all the samaccounts. What I need to be able to do is list only those that are 3 characters or less long. 

Doing this in powershell, tried working with length such as: 

Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize unlimited | select samaccountname | select $_.length -lt 3

However, it doesn't work. 

Anyone have experience with this? 


Viewing all articles
Browse latest Browse all 8719

Trending Articles