Sounds easy, until two ingredients are added.
I have a task I want to start at 4am, run every hour using gMSA credentials, then stop at 8pm. Rinse and repeat.
I found a Reddit post that says modify the task after registering it, but the way they formatted their code I didn’t understand it, but maybe that’s due to Friday brain.
https://www.reddit.com/r/PowerShell/comments/8vjpzq/registerscheduledtask_using_daily_and_repetition/
Dave
I would schedule this to run every hour of every day and if it’s not between 4am and 8pm to terminate without doing anything.
--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntsysadmin+...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/ntsysadmin/CO1PR17MB530871ABAF282431D43C2D76DD072%40CO1PR17MB5308.namprd17.prod.outlook.com.
Oh brilliant, thanks!
From: ntsys...@googlegroups.com <ntsys...@googlegroups.com>
On Behalf Of uj...@pdx.edu
Sent: Friday, December 20, 2024 1:37 PM
To: ntsysadmin <ntsys...@googlegroups.com>
Subject: [ntsysadmin] Re: Create scheduled task via PowerShell
You don't often get email from uj...@pdx.edu. Learn why this is important |
CAUTION: This email originated from outside of OCHIN’s network
Do not click links or open attachments unless you recognize the sender and know the content is safe. If you suspect this email is phishing or a scam, use the report button in the Outlook toolbar to report it to Desktop Support.
To view this discussion visit https://groups.google.com/d/msgid/ntsysadmin/8e05c0ea-cdc3-46b0-be46-cf73972e1dd1n%40googlegroups.com.