Get-SCScriptCommand

Gets all script commands for an application profile, application deployment, or host profile.

Description

The Get-SCScriptCommand cmdlet gets all script commands for an application profile, application deployment, or host profile.

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

Parameters

ApplicationDeployment

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an application deployment object.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

ApplicationProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies an application profile object.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

VMHostProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual machine host profile object.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Get all script commands associated with an application profile.
PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationProfile $AppProfile
PS C:\> $ScriptCommand 
The first command gets the application profile object named SvcWebAppProfile01 and stores the object in the $AppProfile variable.

The second command gets all script commands for the application profile object stored in $AppProfile and stores the objects in the $ScriptCommand array.

The last command displays information about all of the script command objects stored in the $ScriptCommand array to the user.
2: Get all of the script commands associated with an application deployment
PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppDeployment = Get-SCApplicationDeployment -ApplicationProfile $AppProfile
PS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationDeployment $AppDeployment
The first command gets the application profile object named SvcWebAppProfile01 and stores the object in the $AppProfile variable.

The second command gets the application deployment object for the application profile stored in $AppProfile and stores the object in the $AppDeployment variable.

The last command gets all of the script commands associated with the application deployment object stored in $AppDeployment and stores the script commands in $ScriptCommand.

See Also