Laeeq Qazi's Exchange Server Blog

Exchange Server blog

How to log ‘Exchange Management Shell’ session in Exchange 2010\2013


Exchange admins often want to log each and every command and their result to a text file, to be used\reviewed in future.

This is very easy in Exchange 2010\2013.

Locate ‘RemoteExchange.ps1″ file in Exchange Server bin folder, which has this path with default C: drive installation:

C:\Program Files\Microsoft\Exchange Server\V15\Bin

First take a backup of this file and then Open ‘RemoteExchange.ps1″ and put this commands:

$status = start-transcript;
Write-Host -ForegroundColor Green "`n$status;"
Write-Host -ForegroundColor Green "All of your commands would be logged to above mentioned text file`n";

as the last lines in the script, after “get-tip ” command.

Save this file, and restart “Exchange Management Shell”.

Hope this helps you.

Kind Regards,

December 9, 2013 - Posted by | Exchange 2010, Exchange 2013 |

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: