Test-SCServiceTemplate

Validates a service template and stores any errors in the ValidationErrors property of the service template. 

Description

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

For more information about Test-SCServiceTemplate, type: "Get-Help Test-SCServiceTemplate -online".

Parameters

ServiceTemplate

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a service template object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

Update

Required? false
Accept Pipeline Input? false
Position? named
Updates the settings for an object.

Examples

1: Validate a service template.
PS C:\> $SvcTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01" | where { $_.Release -eq "Beta" }
PS C:\> $UpdatedSvcTemplate = Test-SCServiceTemplate -ServiceTemplate $SvcTemplate
PS C:\> $UpdatedSvcTemplate.ValidationErrors[0]
The first command gets the Beta release of the service template object named ServiceTemplate01 and stores the object in the $SvcTemplate variable.

The second command validates the service template in $SvcTemplate.

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

See Also