Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

schedule a power shell script in exchange 2010

Status
Not open for further replies.

scmoh

Technical User
Aug 28, 2001
59
SG
Hi,

How to schedule a power shell script in exchange 2010?
Please help.

Thank you,
SC Moh
 
If I'm not mistaken you would run the sccript on the server, not in Exchange itself. If that is the case you could use the Task Scheduler in Windows.
 
Hi Mltoombs,

Yes, the script is to send email to remind users to change their password.
i tested to run the script in the exchage (CAS) server without any issue.
the script cannot able to run it with task scheduler.

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command ". 'c:\program files\microsoft\exchange server\v14\bin\remoteexchange.ps1'; connect-exchangeserver -auto; c:\scripts\PasswordReminder.ps1"

Please advise.

Thank you
SC Moh

 
I would create a batch file and run that using scheduler. The batch file could be passwordreminder.bat and contain:

@echo off
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command ". 'c:\program files\microsoft\exchange server\v14\bin\remoteexchange.ps1'; connect-exchangeserver -auto; c:\scripts\PasswordReminder.ps1"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top