Set-SmaSchedule

Set-SmaSchedule

Creates or modifies a schedule in .

语法

Parameter Set: Default
Set-SmaSchedule -DayInterval <Int32> -ExpiryTime <DateTime> -Name <String> -ScheduleType <String> -StartTime <DateTime> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Description <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

详细说明

The Set-SmaSchedule cmdlet creates or modifies a schedule in . Specify the name and type of the schedule, and the start and end times.

You can modify only the description when you run this cmdlet against an existing schedule. Start time, expiry time, and day interval can only be set when creating a schedule with this cmdlet.

参数

-AuthenticationType<String>

Specifies the authentication type. Valid values are: Basic, Windows.

Windows is the default value. If you use Basic authentication, you must provide credentials by using the Credential parameter.

别名

是否为必需?

false

位置?

named

默认值

Windows

是否接受管道输入?

false

是否接受通配符?

false

-Credential<PSCredential>

Specifies user credentials, as a PSCredential object, to use for the connection to the web service. To obtain a credential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-DayInterval<Int32>

Specifies an interval, in days, for the schedule.

别名

是否为必需?

true

位置?

named

默认值

1

是否接受管道输入?

false

是否接受通配符?

false

-Description<String>

Provides a description for the schedule.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-ExpiryTime<DateTime>

Specifies when, as a DateTime object, the schedule ends. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date.

别名

是否为必需?

true

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-Name<String>

Specifies the name of a schedule.

别名

是否为必需?

true

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-Port<Int32>

Specifies the port number of the web service.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-ScheduleType<String>

Specifies the type of schedule. Valid values for this parameter are:

-- OneTimeSchedule
-- DailySchedule

别名

是否为必需?

true

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-StartTime<DateTime>

Specifies when, as a DateTime object, the schedule starts. To obtain a DateTime object, use the Get-Date cmdlet.

别名

是否为必需?

true

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-WebServiceEndpoint<String>

Specifies the endpoint, as a URL, of the web service. Include the protocol, for example, http:// or https://.

别名

是否为必需?

true

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-Confirm

运行 cmdlet 之前提示你进行确认。

是否为必需?

false

位置?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

-WhatIf

显示如果运行 cmdlet 则会发生什么情况。cmdlet 未运行。

是否为必需?

false

位置?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

<CommonParameters>

此 cmdlet 支持通用参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

输入

输入类型是指可通过管道传送给 cmdlet 的对象的类型。

输出

输出类型是 cmdlet 所发出对象的类型。

示例

Example 1: Create a schedule

The first command creates a date object by using the Get-Date cmdlet, and then stores the object in the $StartDate variable. This object reflects the current time.

The second command creates a date object by using the Get-Date cmdlet, and then stores the object in the $EndDate variable. The command specifies a future time. For more information, type Get-Help Get-Date.

The last command sets the schedule named Schedule01 to begin at the time stored in $StartDate and end at the time stored in $EndDate

PS C:\> $StartDate = Get-Date 
PS C:\> $EndDate = Get-Date -Day 12 -Month 6 -Year 2023
PS C:\> Set-SmaSchedule -StartTime $StartDate -ExpiryTime $EndDate -Name "Schedule01" -ScheduleType "DailySchedule" -WebServiceEndpoint "https://contoso.com/app01" 

相关主题

Get-SmaSchedule

Remove-SmaSchedule