About Me

SharePoint Architect with over 17 years of IT Experience in various roles as SharePoint Architect, Administrator, Technical Architect, IT Analyst, Application Developer, CRM Consultant, BI Developer, Microsoft Solution Architect in Client/Server, Web and Enterprise CRM Applications in E-Commerce, Financial, Healthcare, Insurance, Telecom, Outsourcing and Technology Services.
MCITP (Pro): Microsoft Certified IT Professional: SharePoint 2010 Administrator.
MCTS: Microsoft Certified Technology Specialist, SharePoint 2010 Configuration.

Wednesday, October 26, 2011

PowerShell Script to query/enumerate Scheduled Jobs on a Server

PS Code to query/enumerate Scheduled Jobs on Server:

$servername = "ServerName"
$schedule = new-object -com Schedule.Service
$schedule.connect($servername)
$tasks = $schedule.getfolder("\").gettasks(0)
$tasks |select name, path, lasttaskresult, lastruntime

No comments:

Post a Comment