Scheduling PowerShell Scripts

Just a quick Post…

Yesterday I had to schedule PowerShell scripts on a Windows 2003 Server, this following technique worked for me but I have not tested it on other OS platform.
Similar to a VBScript in the AT scheduled job you point to a .bat or .cmd file for the Program to run. In this file you have the below code to initialize the script in its shell.

In the .bat or .cmd file you will need the following code.

Powershell -NoLogo -Command "&{C:\Scripts\Posh\Script1.ps1}"

Hope this helps.

All information is provided on an AS-IS basis, with no warranties and confers no rights.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s