Share via


Get-SCScriptCommand

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

Syntax

ApplicationProfile

Get-SCScriptCommand
    -ApplicationProfile <ApplicationProfile>
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

ApplicationDeployment

Get-SCScriptCommand
    -ApplicationDeployment <ApplicationDeployment>
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

PhysicalComputerProfile

Get-SCScriptCommand
    -PhysicalComputerProfile <PhysicalComputerProfile>
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

Description

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

Examples

Example 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.

Example 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.

Parameters

-ApplicationDeployment

Specifies an application deployment object.

Parameter properties

Type:ApplicationDeployment
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ApplicationDeployment
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplicationProfile

Specifies an application profile object.

Parameter properties

Type:ApplicationProfile
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ApplicationProfile
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-PhysicalComputerProfile

Specifies a profile that is used to deploy an operating system to a computer.

Parameter properties

Type:PhysicalComputerProfile
Default value:None
Supports wildcards:False
DontShow:False
Aliases:VMHostProfile

Parameter sets

PhysicalComputerProfile
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

ScriptCommand

This cmdlet returns a ScriptCommand object.