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

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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