Assigning variable in powershell and passing to commands -
i'm trying leverage get-mailboxfolderstatistics
commandlet obtain item counts inbox folders list of users within distribution list.
i've used get-distributiongroupmember
commandlet filtering "name" , assigned variable.
here need , perhaps there simpler method, want pass each of user names "identity" parameter of get-mailboxfolderstats
command script each of users in given distribution group provide me folder stats desire.
thank reading , help.
so far have:
$s = get-distributiongroupmember -identity 23rdfloor | select name
piping result foreach command should work;
$s = get-distributiongroupmember -identity 23rdfloor | select name
$s | foreach-object {get-mailboxfolderstatistics -identity $_.name }
Comments
Post a Comment