< Back

Remove-ExpiredScheduledRestartComputerJob

Sat Jan 18, 2020 4:33 pm

NAME Remove-ExpiredScheduledRestartComputerJob



SYNOPSIS

Clean up expired Scheduled Restart-Computer jobs and scripts.





SYNTAX

Remove-ExpiredScheduledRestartComputerJob [[-JobNamePrefix] <String>] [[-ScriptFilePath] <String>] [-WhatIf]

[-Confirm] [<CommonParameters>]





DESCRIPTION

Clean up expired Scheduled Restart-Computer jobs and scripts.





PARAMETERS

-JobNamePrefix <String>

The prefix of the scheduled restart computer job exists to differentiate

the restart jobs from other PowerShell scheduled jobs.



Required? false

Position? 1

Default value RestartComputer-

Accept pipeline input? false

Accept wildcard characters? false



-ScriptFilePath <String>

The path to the script file that is executed by the scheduled restart computer

job.



Required? false

Position? 2

Default value C:\\Temp\\

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Created by: Jason Wasser @wasserja

Modified: 6/2/2017



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Remove-ExpiredScheduledRestartComputerJob













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Remove-ExpiredScheduledRestartComputerJob -JobNamePrefix 'RestartComputerJob' -ScriptFilePath 'C:\\Scripts'



Requires -RunAsAdministrator

Requires -Modules PSScheduledJob











RELATED LINKS