Exchange Active Sync file output
I have the below Power shell command string (Exchange 2007) that I am working with. My question is how can I send the out put to a txt file? The output will not all stay listed in the command prompt due to size. $mbx = get-casmailbox -Filter {HasActivesyncDevicePartnership -eq $true -and -not DisplayName -like "CAS_{*"}; $mbx | foreach {$name = $_.name; $device = get-activesyncdevicestatistics -mailbox $_.identity; $device | foreach {write-host $mbx.name, $_.devicemodel, $_.devicephonenumber, $_.Identity, $_.deviceid, $_.FirstSyncTime, $_.LastSuccessSync} }
December 6th, 2010 5:51pm

Hello Dvua, Just add at the end of the line >D:\outputFolder\Output.txt EG: Get-CasMailbox ............. >D:\OutputFolder\Output.txtIbrahim Al Masry http://www.ibra.me/
Free Windows Admin Tool Kit Click here and download it now
December 7th, 2010 2:35am

Any update on this case?Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
December 13th, 2010 4:06am

If the suggestion from Ibrabim doesn’t work for you, you can use “Out-File” cmdlet to export the filePlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
December 13th, 2010 4:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics