Link to home
Start Free TrialLog in
Avatar of Manish Kumar
Manish Kumar

asked on

I need to do some activity on exchange server which can be counted as an value add to my organisation

Hi Team,

I need to do some activity in exchange server 2010 which can be counted as an value add to my organization.
For example, One of my colleague has make a script for exchange health monitoring. I also need to do some activity or prepare some script which is beneficial for my team in exchange server 2010.
ASKER CERTIFIED SOLUTION
Avatar of Rezwan Islam
Rezwan Islam
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Manish Kumar
Manish Kumar

ASKER

Hi Rezwan,

it is really nice. May i know how to run this and how can automate this so that it can work without any manual intervention.
You can create a CMD file using the following context and then set up a schedule task to call the CMD file to automate this failback process.

Paste the above script in a notepad and save as NotifyDBFailover.ps1. Paste the following batch commands in a notepad and save it as a NotifyDBFailover.CMD file and keep both these files under a folder called, lets say, C:\Scripts

#================CMD-FILE-CONTYEXT=============
@echo off
Powershell.exe -Command ".'C:\Program Files\Microsoft\Exchange Server\V14\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; C:\scripts\NotifyDBFailover.ps1"

#===============CMD-FILE-END===================

Then on the schedule task Action tab, select
Action: Start a program
Under Settings section, program/script: C:\Scripts\NotifyDBFailover.cmd
Start in (Optional): C:\Scripts

You can set a trigger for every 30 minutes.

Hope this helps.