For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set-PSUSchedule

Updates a schedule.

SYNOPSIS

Updates a schedule.

SYNTAX

Schedule (Default)

Set-PSUSchedule [-Schedule] <Schedule> [[-Cron] <String>] [-Description <String>] [[-Script] <String>]
 [-Workflow <String>] [-TimeZone <String>] [-Continuous <Boolean>] [-Delay <TimeSpan>] [-Credential <String>]
 [-OneTime <DateTime>] [-Environment <String>]
 [-Parameters <System.Collections.Generic.List`1[PowerShellUniversal.ScheduleParameter]>] [-Name <String>]
 [-Paused <Boolean>] [-Timeout <Int32>] [-Condition <String>] [-RandomDelay <Boolean>] [-Computer <String>]
 [-RandomDelayMaximum <Int32>] [-AvailableInBranch <System.Collections.Generic.List`1[System.String]>]
 [-Module <String>] [-EveryHour <Boolean>] [-Minute <Int32>] [-EveryDay <Boolean>] [-Hour <Int32>]
 [-DayOfWeek <Boolean>] [-Day <String[]>] [-EveryMonth <Boolean>] [-DayOfMonth <Int32>]
 [-SpecificMonth <Boolean>] [-Month <String[]>] [-ComputerGroup <String>]
 [-ComputerGroupInvocationType <ComputerGroupInvocationType>] [-Folder <String>] [-ComputerName <String>]
 [-AppToken <String>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

Id

DESCRIPTION

Updates the configuration of an existing schedule by Id or by passing a schedule object through the pipeline.

EXAMPLES

Example 1

Updates schedule 12 to use a nightly CRON expression.

PARAMETERS

-AppToken

Specifies the app token to use when authenticating to the PowerShell Universal management API.

-Computer

Specifies the computer to target.

-ComputerName

Specifies the URL or host name of the target PowerShell Universal instance. Bare host names are normalized to an http://:5000 URL.

-Condition

Specifies a condition that must evaluate successfully before the resource runs.

-Continuous

Runs the schedule continuously instead of using a fixed calendar expression.

-Credential

Credentials to login to the PowerShell Universal Management API.

-Cron

Specifies the CRON expression for the schedule.

-Delay

Specifies the delay between executions.

-Description

Specifies a description for the resource.

-Environment

Specifies the execution environment to use.

-Id

Specifies the numeric Id of the resource.

-Integrated

Uses the in-process integrated management client when the cmdlet runs inside PowerShell Universal.

-Name

Specifies the name of the resource.

-OneTime

Schedules the resource to run once at the specified date and time.

-Parameters

Specifies parameter values to pass to the resource when it runs.

-Paused

Creates or updates the schedule in a paused state.

-RandomDelay

Adds a randomized delay before the schedule runs.

-RandomDelayMaximum

Specifies the maximum randomized delay, in seconds.

-Schedule

Specifies the schedule to target.

-Script

Specifies the script to target.

-TimeZone

Specifies the time zone used when interpreting schedule times.

-Timeout

Specifies the timeout, in seconds, for the operation.

-UseDefaultCredentials

Uses the current Windows credentials when authenticating to the management API.

-AvailableInBranch

Specifies the Git branches where the resource is available.

-ComputerGroup

Specifies the computer group to target or assign.

-ComputerGroupInvocationType

Specifies how jobs are invoked across the selected computer group.

-Cookies

Reuses and persists authentication cookies for the current PowerShell session.

-Day

Specifies the days of the week on which the schedule should run.

-DayOfMonth

Specifies the day of the month on which the schedule should run.

-DayOfWeek

Schedules execution on specific days of the week.

-EveryDay

Schedules execution every day.

-EveryHour

Schedules execution every hour.

-EveryMonth

Schedules execution every month.

-Folder

Specifies the folder to target.

-Hour

Specifies the hour component of the schedule.

-Minute

Specifies the minute component of the schedule.

-Module

Specifies the PowerShell module name to use.

-Month

Specifies the months in which the schedule should run.

-SpecificMonth

Schedules execution only during the months specified by Month.

-TrustCertificate

Allows connections to servers with untrusted TLS certificates.

-Workflow

Specifies the workflow to target.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.

INPUTS

PowerShellUniversal.Schedule

OUTPUTS

System.Object

NOTES

Last updated

Was this helpful?