Skip to content

How to add a powershell script to run as a scheduled task.

by Patrick Durante on October 2nd, 2014

Make sure you have the latest version of the PowerCLI before you begin.  You can grab a copy from the VMware site.

Launch secpol.msc and edit the batch login service to allow the account you are going to use.  In local security console –> User Right Assignment –> Log on as a batch job.

In the run command add the following:


In the argument box add the following.

-PSconsolefile “C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1” “& ‘C:\Scripts\adjustshares.ps1′”

Make sure you have credentials in the script and the account has rights to log into Vcenter.

From → Uncategorized

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS


WP-SpamFree by Pole Position Marketing