New-CMTSStepRunPowerShellScript

SYNOPSIS

Crie o passo do Script 'Executar PowerShell' numa sequência de tarefas.

SYNTAX

ByName (Padrão)

New-CMTSStepRunPowerShellScript -Name <String> [-SuccessCode <Int32[]>] [-Condition <IResultObject[]>]
 [-ContinueOnError] [-Description <String>] [-Disable] [-DisableWildcardHandling] [-ForceWildcardHandling]
 [-WhatIf] [-Confirm] [<CommonParameters>]

RunScriptFromSource

New-CMTSStepRunPowerShellScript [-ExecutionPolicy <ExecutionPolicyType>] -Name <String>
 [-OutputVariableName <String>] [-Parameter <String>] -SourceScript <String> [-SuccessCode <Int32[]>]
 [-TimeoutMins <Int32>] [-UserName <String>] [-UserPassword <SecureString>] [-WorkingDirectory <String>]
 [-Condition <IResultObject[]>] [-ContinueOnError] [-Description <String>] [-Disable]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RunScriptFromPackage

New-CMTSStepRunPowerShellScript [-ExecutionPolicy <ExecutionPolicyType>] -Name <String>
 [-OutputVariableName <String>] -PackageId <String> [-Parameter <String>] -ScriptName <String>
 [-SuccessCode <Int32[]>] [-TimeoutMins <Int32>] [-UserName <String>] [-UserPassword <SecureString>]
 [-WorkingDirectory <String>] [-Condition <IResultObject[]>] [-ContinueOnError] [-Description <String>]
 [-Disable] [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Nota

Executar cmdlets do Gestor de Configuração a partir da unidade do site do Gestor de Configuração, por exemplo PS XYZ:\> . Para mais informações, consulte a partida.

EXAMPLES

Exemplo 1

PS XYZ:\>

PARAMETERS

-Condição

Type: IResultObject[]
Parameter Sets: (All)
Aliases: Conditions

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Solicita a sua confirmação antes de executar o cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContinueOnError

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Descrição

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Desativar

Type: SwitchParameter
Parameter Sets: (All)
Aliases: DisableThisStep

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableWildcardHandling

Este parâmetro trata os caracteres wildcard como valores de caracteres literais. Não pode combiná-lo com ForceWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Política de Execução

Type: ExecutionPolicyType
Parameter Sets: RunScriptFromSource, RunScriptFromPackage
Aliases: PowerShellExecutionPolicy
Accepted values: AllSigned, Undefined, Bypass

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForceWildcardHandling

Este parâmetro processa caracteres wildcard e pode levar a um comportamento inesperado (não recomendado). Não é possível combiná-lo com DisableWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

Type: String
Parameter Sets: (All)
Aliases: StepName

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Nome Variavel de Saída

Utilize este parâmetro para configurar a seguinte definição no passo da sequência de tarefas do Script De Execução PowerShell: Saída para a sequência de tarefas variável. Guarde a saída de comando para uma variável de sequência de tarefa personalizada.

Type: String
Parameter Sets: RunScriptFromSource, RunScriptFromPackage
Aliases: Output, OutputVariable

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PackageId

Type: String
Parameter Sets: RunScriptFromPackage
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Parâmetro

Type: String
Parameter Sets: RunScriptFromSource, RunScriptFromPackage
Aliases: Parameters

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptName

Type: String
Parameter Sets: RunScriptFromPackage
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceScript

{{ Preenchimento Descrição do Origem }}

Type: String
Parameter Sets: RunScriptFromSource
Aliases: SourceCode

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Código de Sucesso

{{ Preencha a descrição do Código de Sucesso }}

Type: Int32[]
Parameter Sets: (All)
Aliases: SuccessCodes

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeoutMins

{{ Preencha a descrição dos TimeoutMins }}

Type: Int32
Parameter Sets: RunScriptFromSource, RunScriptFromPackage
Aliases: TimeoutInMinutes

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserName

{{ Preencha descrição do nome do utilizador }}

Type: String
Parameter Sets: RunScriptFromSource, RunScriptFromPackage
Aliases: User

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Palavra de UserPass

{{ Preencha a descrição do UserPassword }}

Type: SecureString
Parameter Sets: RunScriptFromSource, RunScriptFromPackage
Aliases: Password

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

- O QueIf

Apresenta o que aconteceria mediante a execução do cmdlet. O comandante não funciona.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkingDirectory

{{ Preencha descrição do funcionamento do funcionamento }}

Type: String
Parameter Sets: RunScriptFromSource, RunScriptFromPackage
Aliases: StartIn

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

Este cmdlet suporta os parâmetros comuns: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction e -WarningVariable. Para mais informações, consulte about_CommonParameters.

INPUTS

Nenhuma

OUTPUTS

IResultObject#SMS_TaskSequence_RunPowerShellScriptAction

NOTAS