Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • PowerCLI Cookbook
  • Toc
  • feedback
PowerCLI Cookbook

PowerCLI Cookbook

By : Philip Brandon Sellers
4.8 (4)
close
PowerCLI Cookbook

PowerCLI Cookbook

4.8 (4)
By: Philip Brandon Sellers

Overview of this book

If you are a virtualization professional who wants to unleash the power of automation and combat the complexity of sprawling virtual environments, this book is ideal for you. This book will enhance your skills of administering VMware vSphere and vCloud Director with PowerCLI.
Table of Contents (13 chapters)
close
12
Index

Using PowerShell native capabilities to schedule scripts


In the previous recipes of this book, you scheduled PowerCLI to run as scheduled tasks by defining and referring to a script file (.ps1) and running it from the PowerShell.exe executable. There is potentially a better and easier way to schedule your processes to run from PowerShell and PowerCLI and those are known as Scheduled Jobs. Scheduled Jobs were introduced in PowerShell 3.0 and distributed as part of the Windows Management Framework 3.0 and higher.

While Scheduled Tasks can execute any Windows batch file or executable, Scheduled Jobs are specific to PowerShell and are used to generate and create background jobs that run once or on a specified schedule. Scheduled Jobs appear in the Windows Task Scheduler and can be managed with the scheduled task cmdlets of PowerShell. The only difference is that the scheduled jobs cmdlets cannot manage scheduled tasks.

These jobs are stored in the Microsoft\Windows\PowerShell\ScheduledJobs path...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete