Get-SCScriptCommand
Gets all script commands for an application profile, application deployment, or host profile.
Syntax
Get-SCScriptCommand
-ApplicationProfile <ApplicationProfile>
[-VMMServer <ServerConnection>]
[<CommonParameters>]
Get-SCScriptCommand
-ApplicationDeployment <ApplicationDeployment>
[-VMMServer <ServerConnection>]
[<CommonParameters>]
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.
Type: | ApplicationDeployment |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ApplicationProfile
Specifies an application profile object.
Type: | ApplicationProfile |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PhysicalComputerProfile
Specifies a profile that is used to deploy an operating system to a computer.
Type: | PhysicalComputerProfile |
Aliases: | VMHostProfile |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Outputs
ScriptCommand
This cmdlet returns a ScriptCommand object.