Invoke-PSUSchedule
Trigger a PowerShell Universal schedule immediately by ID, name, or schedule object.
SYNOPSIS
Triggers a PowerShell Universal schedule to run immediately.
SYNTAX
Invoke-PSUSchedule -Id <Int64> [<ConnectionOptions>] [<CommonParameters>]
Invoke-PSUSchedule -Name <String> [<ConnectionOptions>] [<CommonParameters>]
Invoke-PSUSchedule -Schedule <Schedule> [<ConnectionOptions>] [<CommonParameters>]<ConnectionOptions>: [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies].
DESCRIPTION
Triggers an existing schedule through the same execution path as the admin console. Select it by numeric ID, case-insensitive name, or a Schedule object from Get-PSUSchedule through the pipeline. A schedule object needs a valid ID or name; an unknown schedule raises an error.
EXAMPLES
Invoke-PSUSchedule -Id 10
Invoke-PSUSchedule -Name 'Nightly maintenance'
Get-PSUSchedule -Name 'Nightly maintenance' | Invoke-PSUSchedulePARAMETERS
-Id
Numeric ID of the schedule to trigger.
-Name
Case-insensitive name of the schedule to trigger.
-Schedule
Schedule object; accepts pipeline input.
-ComputerName
PSU Management API URL or host name (alias -Uri).
-AppToken
Management API app token.
-Credential
Management API credentials.
-UseDefaultCredentials
Uses current Windows credentials.
-Integrated
Uses the in-process management client.
-TrustCertificate
Ignores certificate validation errors.
-Cookies
Reuses session authentication cookies.
OUTPUTS
None.
RELATED LINKS
PERMISSIONS
The access token requires automation.schedules/execute to run this cmdlet remotely.
Was this helpful?