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 }

http://www.mikepfeiffer.net/2010/02/exchange-management-shell-error-pipelines-cannot-be-executed-concurrently/


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -