Laeeq Qazi's Exchange Server Blog

Exchange Server blog

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

Hi,

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 | | Leave a comment