RedistributeActiveDatabases.ps1 not running via Task Scheduler
Posted on 2013-11-27
Environment: Exchange 2010 SP2 + Windows 2008 R2
I am having some issues to run a built-in Exchange Script using Task Scheduler.
I have no issues running the script manually like:
.\RedistributeActiveDatabases.ps1 -DagName DAG01 -BalanceDbsByActivationPreference -confirm:$false
My task scheduler shows as completed successfully (0x0). But nothing happens.
I already changed the quotes several times but so far no luck.
Here it is how the task is set:
Run whether user is logged on or not - checked
Run with highest privileges - checked
Add arguments: -command ". 'c:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; 'c:\Program Files\Microsoft\Exchange Server\V14\Scripts\RedistributeActiveDatabases.ps1 -DagName DAG01 -BalanceDbsByActivationPreference -confirm:$false'"
Does anyone has any idea why the script is not running via Task?
It runs fine manually.
The user has the highest permission(Administrator).