Get-SCScriptCommand
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 -PhysicalComputerProfile <PhysicalComputerProfile> [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed Description
The Get-SCScriptCommand cmdlet gets all script commands for an application profile, application deployment, or host profile.
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 |
-PhysicalComputerProfile<PhysicalComputerProfile>
Specifies a profile that is used to deploy an operating system to a computer.
Aliases |
VMHostProfile |
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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).
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
Example 1: Get all script commands associated with an application profile
The first command gets the application profile object named SvcWebAppProfile01, and then stores the object in the $AppProfile variable.
The second command gets all script commands for the application profile object stored in $AppProfile, and then stores the objects in the $ScriptCommand array.
The last command displays information about all of the script command objects stored in the $ScriptCommand array.
PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationProfile $AppProfile
PS C:\> $ScriptCommand
Example Example 2: Get all of the script commands associated with an application deployment
The first command gets the application profile object named SvcWebAppProfile01, and then stores the object in the $AppProfile variable.
The second command gets the application deployment object for the application profile stored in $AppProfile, and then 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 then stores the script commands in $ScriptCommand.
PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppDeployment = Get-SCApplicationDeployment -ApplicationProfile $AppProfile
PS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationDeployment $AppDeployment