locked
RedistributeActiveDatabases.ps1 RRS feed

  • Question

  • Hi

    I am new to Exchange 2010 and Exchange management Shell. So I need some help please!

    I want to run 'RedistributeActiveDatabases.ps1' with follwing paramereters -DAGNAME XX --BalanceDbsByActivationPreference -ShowFinalDatabaseDistribution -Confirm:$False | Out-File C:\ActiceDB.txt.

    I need to start the above in a cmd-file e.g. ActiveDB.cmd

    I have tried, but it does not work!:C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\V14\bin\exshell.psc1" -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RedistributeActiveDatabases.ps1';-BalanceDbsByActivationPreference -ShowFinalDatabaseDistribution -Confirm:$False | Out-File C:\ActiveDB.txt

    ??

    Thanks.

     

    Alex

     

     

     

    Wednesday, January 25, 2012 10:12 PM

Answers

  • Hi
       open EMS
      PS C:\>cd “C:\Program Files\Microsoft\Exchange Server\V14\Scripts”
      PS C:\Program Files\Microsoft\Exchange Server\V14\Scripts> .\RedistributeActiveDatabases.ps1 –DagName DAG1 –BalanceDBsByActivationPreference –Confirm:$false


    Terence Yu

    TechNet Community Support

    • Marked as answer by Terence Yu Thursday, February 2, 2012 7:41 AM
    Thursday, January 26, 2012 2:44 AM

All replies

  • Cant you just do it with .ps1?

    Something like this - %systemroot%\system32\WindowsPowerShell\v1.0\powershell.exe “.\$yourscript.ps1"


    Sukh
    Wednesday, January 25, 2012 11:49 PM
  • Hi
       open EMS
      PS C:\>cd “C:\Program Files\Microsoft\Exchange Server\V14\Scripts”
      PS C:\Program Files\Microsoft\Exchange Server\V14\Scripts> .\RedistributeActiveDatabases.ps1 –DagName DAG1 –BalanceDBsByActivationPreference –Confirm:$false


    Terence Yu

    TechNet Community Support

    • Marked as answer by Terence Yu Thursday, February 2, 2012 7:41 AM
    Thursday, January 26, 2012 2:44 AM
  • Scripts AFAIR are in Scripts subdirectory, not bin as you wrote.


    Regards, Konrad Sagala, MCT, MCSE+M, MCITP: Exchange 2007/2010
    Thursday, January 26, 2012 9:39 AM
  • Hi
       Can you post your result ?

    Terence Yu

    TechNet Community Support

    Monday, January 30, 2012 2:07 AM