This topic contains 4 replies, has 2 voices, and was last updated by
September 18, 2013 at 7:39 am #10209
trying to get a list of mailboxes and their sizes. Got a script but it takes a very long time to run on the environment of 40000+ users. I'm checking on a method to have each server get their own users and sizes and run it as a job. For some reason the below is not working. Any idea ? (i know about the implicit remoting, interested on how to run Exchange commands as powershell jobs)
get-mailbox} -asjob -computer Servername
September 18, 2013 at 7:48 am #10210ParticipantTopics: 0Replies: 669Points: 0Rank: Member
Because you can't remote into an Exchange machine in that manner. You have to create a PSsession to the Exchange PowerShell URI and import the session. Alternatively install the Exchange admin tools on your admin machine
To create an session to an Exchange box and import the cmdlets
$sess = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "http://
/PowerShell" -Authentication Kerberos -Credential $cred -ErrorAction Stop
You may be able to leave out the credential
import the session like this
September 18, 2013 at 8:14 am #10213
Ok. I'm interested to run "Get-Mailbox" on multiple servers in parallel (preferably using Powershell jobs).
Any idea how to do that ?
September 18, 2013 at 8:19 am #10214ParticipantTopics: 0Replies: 669Points: 0Rank: Member
I suspect that the best way to do it is to install the Exchange admin tools on your local machine. Each job will have to install the Exchange snapin (jobs run in a separate PowerShell process) and run the command against the appropriate server
September 18, 2013 at 8:26 am #10215
thanks. If you have time to post a quick example would be very helpful.
All i'm trying to do is have each mailbox server get the mailboxes and their sizes (in parallel) than my computer doing all the work.
It takes almost 2 days for the script to run from my computer.
The topic ‘Exchange Powershell -asjob’ is closed to new replies.