Reputation: 1467
I am new to powershell, and I saw this code snippet recently:
$users = Get-User
$users | % { $user = $_; Get-MailboxStatistics $_ | %
{
"User name:{0} - some mailbox statistics: {1}" -f $user.SomePropertyOfUser, $_.SomePropertyOfMailbox
}
}
What does the % mean here? It seems to be marking the beginning of a block of code, is that right? many thx!
Upvotes: 0
Views: 97
Reputation: 26140
this is an alias for the foreach-object
cmdlet
another other alias frequently use is : ?
that stands for where-object
Upvotes: 3