Get-SCScriptCommandSetting
Gets the settings for a script command.
Syntax
Default (Default)
Get-SCScriptCommandSetting
-ScriptCommand <SCScriptCommand>
[<CommonParameters>]
Description
The Get-SCScriptCommandSetting cmdlet gets the settings that have been configured on a script command.
Examples
Example 1: Get the script command settings for a specific script command
PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationProfile $AppProfile | Where {$_.Name -eq "PostInstall"}
PS C:\> Get-SCScriptCommandSetting -ScriptCommand $ScriptCommand
The first command gets the application profile object named SvcWebAppProfile01 and stores the object in the $AppProfile variable.
The second command gets the script command object named PostInstall and stores the object in the $ScriptCommand variable.
The last command gets the script command settings for the script command stored in $ScriptCommand and displays the settings for the user.
Parameters
-ScriptCommand
Specifies a script command object.
Parameter properties
| Type: | SCScriptCommand |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| 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
ScriptCommandSetting
This cmdlet returns a ScriptCommandSetting object.