CmdID / PowerShell / Cmdlets / Unregister
Unregister-ScheduledJob
Deletes scheduled jobs on the local computer. PowerShell reference
From the PowerShell reference 6 parameters
What it does
Deletes scheduled jobs on the local computer. The Unregister-ScheduledJob cmdlet deletes scheduled jobs from the local computer. When it deletes or unregisters a scheduled job, Unregister-ScheduledJob deletes the directory for the scheduled job (in the $HOME\AppData\Local\Microsoft\Windows\PowerShell\ScheduledJobs directory), which contains the XML file that defines the scheduled job, the job execution history, and all job results. This action also deletes the job from Task Scheduler. Unregister-ScheduledJob deletes only the scheduled jobs that are created by using the Register-ScheduledJob cmdlet. It does not delete scheduled jobs that are created in Task Scheduler. You can use the parameters of Unregister-ScheduledJob to delete scheduled jobs by ID or name, or pipe scheduled jobs from Get-ScheduledJob to Unregister-ScheduledJob. Unregister-ScheduledJob is one of a collection of job scheduling cmdlets in the PSScheduledJob module that is included in Windows PowerShell. For more information about Scheduled Jobs, see the About topics in the PSScheduledJob module. Import the PSScheduledJob module and then type: Get-Help about_Scheduled* or see about_Scheduled_Jobs. This cmdlet was introduced in Windows PowerShell 3.0.
Unregister-ScheduledJob [-InputObject] <ScheduledJobDefinition[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]Unregister-ScheduledJob [-Id] <Int32[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]Unregister-ScheduledJob [-Name] <String[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Delete a scheduled job
Unregister-ScheduledJob TestJobIdentifyDelete all scheduled jobs
Get-ScheduledJob | Unregister-ScheduledJob -Force
Unregister-ScheduledJob -Name "*" -ForceIdentifyDelete a scheduled job on a remote computer
Invoke-Command -ComputerName "Server01" { Unregister-ScheduledJob -Name "Test*"}IdentifyIts page in the reference: Unregister-ScheduledJob.
Parameters
-ForceDeletes the scheduled job even if an instance of the job is running. By default,
Unregister-ScheduledJob does not interrupt running jobs.-IdDeletes the scheduled jobs with the specified identification numbers (ID). Enter the IDs of scheduled jobs on the computer.-InputObjectSpecifies a scheduled job. Enter a variable that contains ScheduledJob objects or type a command or expression that gets ScheduledJob objects, such as a Get-ScheduledJob command. You can also pipe ScheduledJob objects to Unregister-JobTrigger.-NameDeletes the scheduled jobs with the specified names. Enter the names of one or more scheduled jobs on the computer. Wildcards are supported.-ConfirmPrompts you for confirmation before running the cmdlet.-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.