Test-SCServiceTemplate

Test-SCServiceTemplate

Validates a service template and stores errors in the service template.

構文

Parameter Set: Default
Test-SCServiceTemplate [-ServiceTemplate] <ServiceTemplate> [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Update] [ <CommonParameters>]

詳細説明

The Test-SCServiceTemplate cmdlet validates a service template and stores the errors in the ValidationErrors property of the service template.

パラメーター

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-ServiceTemplate<ServiceTemplate>

Specifies a service template object.

エイリアス

none

必須?

true

位置は?

1

既定値

none

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

True (ByValue)

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

false

-Update

Updates the settings for an object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

<CommonParameters>

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

入力

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

出力

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

  • ServiceTemplate

Example 1: Validate a service template

The first command gets the Beta release of the service template object named ServiceTemplate01, and then stores the object in the $SvcTemplate variable.

The second command validates the service template in $SvcTemplate.

The final command displays the first validation error for service template from the validation error array.

PS C:\> $SvcTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01" | where { $_.Release -eq "Beta" }
PS C:\> $UpdatedSvcTemplate = Test-SCServiceTemplate -ServiceTemplate $SvcTemplate
PS C:\> $UpdatedSvcTemplate.ValidationErrors[0] 

関連トピック

Get-SCServiceTemplate

New-SCServiceTemplate

Read-SCServiceTemplate

Remove-SCServiceTemplate

Resolve-SCServiceTemplate

Set-SCServiceTemplate