Export (0) Print
Expand All
Expand Minimize

Get-SCScriptCommand

Updated: September 27, 2012

Applies To: System Center 2012 - Virtual Machine Manager

Get-SCScriptCommand

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

Syntax

Parameter Set: ApplicationDeployment
Get-SCScriptCommand -ApplicationDeployment <ApplicationDeployment> [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: ApplicationProfile
Get-SCScriptCommand -ApplicationProfile <ApplicationProfile> [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: VMHostProfile
Get-SCScriptCommand -VMHostProfile <VMHostProfile> [-VMMServer <ServerConnection> ] [ <CommonParameters>]




Detailed 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<ApplicationDeployment>

Specifies an application deployment object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ApplicationProfile<ApplicationProfile>

Specifies an application profile object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VMHostProfile<VMHostProfile>

Specifies a virtual machine host profile object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • ScriptCommand

Examples

1: Get all script commands associated with an application profile.

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.


PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"PS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationProfile $AppProfilePS C:\> $ScriptCommand

2: Get all of the script commands associated with an application deployment

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.


PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"PS C:\> $AppDeployment = Get-SCApplicationDeployment -ApplicationProfile $AppProfilePS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationDeployment $AppDeployment

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft