Avatar of sara2000
sara2000

asked on 

PS script to get scheduled task at time.

Windows server has a ton of scheduled tasks and one of them uses heavy resources. I would like to get time and day of schedules which ran at a particular time in Windows 2016. Can someone share a PS script? Say, for example, 10 AM schedules.
Powershell

Avatar of undefined
Last Comment
Sam Jacobs
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

Get-ScheduledTask | Get-ScheduledTaskInfo | where {$_.NextRuntime -match "10:00:00"}

Open in new window


Should list what you need
ASKER CERTIFIED SOLUTION
Avatar of Sam Jacobs
Sam Jacobs
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of sara2000
sara2000

ASKER

Sam, It does what I want to get out of it. How do I send this report as an e-mail?
Avatar of Sam Jacobs
Sam Jacobs
Flag of United States of America image

Give me a bit and I'll whip up the lines to email it.
Do you want to send the report as plaintext, or would you like it converted to HTML first?
SOLUTION
Avatar of Sam Jacobs
Sam Jacobs
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Powershell
Powershell

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.

27K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo