Velocity Technical Archive
EMS and pipeing can be very powerful
Archived Reference: This is a historical technical article preserved from the Velocity Technologies knowledge base. For current Phoenix and East Valley managed IT services, explore our managed IT services or cybersecurity solutions.
Pipelining in Exchange Management Shell can be very powerful. For instance if you do this command\nget-mailbox | where-object { $_.name -like "john*" } | set-Mailbox -MaxSendSize 100mb\nIt will do the first part before the first pipe get-mailbox you can then use the where command to select particular mailboxes finally the second pipe can be used to apply a 3rd command to all of the mailboxes that match this criteria.\nMore examples:\nGet -AddressList | export -csv "c:tempAddresslist.csv"\nget-Mailbox | set -mailbox -storagequota 100mb\nget-mailbox | -organizationalunit "sales" | set-mailbox -maxsendsize 5mb\nmove-mailbox -sourceforest n2networksolutions.com -targetForest jeremywhittaker.com -targetdatabase "mailbox store 10" N2Storedb1\ndisable-mailbox n2networksolutionsjeremy\nget-mailbox -database "db1" | disable-mailbox -whatif\nnew-storagegroup -server severN2 -name "sales storage group" -logfilelocation "f:logssalesStorageGroup"\nset-storagegroup "sales storage group" -circularloggingenabled $true\nmove-storagegrouppath "sales" -logfolderpath "g:logssales" -systemfolderpath "H:databasessales"\nnew-mailboxdatabase -storagegroup "serverN2first storage group" -name "technical support team"\nmount-database "serverN2First Storage Grouptechnical support team"