none
PowerShell Script über den Task Scheduler starten RRS feed

Antworten

  • Hallo Werner211

    also ich würde das wie unter http://technet.microsoft.com/en-us/library/bb123798.aspx beschrieben machen:

    If you want to run a script on a scheduled basis using the Windows Task Scheduler service, you can call the Shell and include the script that you want to run as a parameter. If you want to use Exchange cmdlets with your script, you must direct Windows PowerShell to connect to a server running Exchange and load the Exchange cmdlets you have access to. The shortcut you use to open the Shell does this automatically. To do this when you want to run a script that contains Exchange cmdlets, you must direct Windows PowerShell to run the scripts that make this connection. This syntax is required to open Windows PowerShell, connect to an Exchange server, and run your script from the Cmd.exe command.

    PowerShell.exe -command ". 'D:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; <path to your script>"

    Ein etwas andere Beispiel solltest Du auch schon auf Deinem Exchange Server finden. Schau mal in den Scheduled Tasks, da müsste ein Task mit der Bezeichnung "Database One Copy Alert" erscheinen.

    Viele Grüße

    Timo


    Donnerstag, 24. Mai 2012 19:33

Alle Antworten