New-CCMDeploymentStep

New-CCMDeploymentStep

New-CCMDeploymentStep

Adds a Deployment Step to a Deployment Plan

Syntax

New-CCMDeploymentStep `
  -Deployment <String> `
  -Name <String> `
  [-TargetGroup <String[]>] `
  [-ExecutionTimeoutSeconds <String>] `
  [-FailOnError] `
  [-RequireSuccessOnAllComputers] `
  [-ValidExitCodes <String[]>] `
  -Type <String> `
  -Script <ScriptBlock> [<CommonParameters>]
New-CCMDeploymentStep `
  -Deployment <String> `
  -Name <String> `
  [-TargetGroup <String[]>] `
  [-ExecutionTimeoutSeconds <String>] `
  [-FailOnError] `
  [-RequireSuccessOnAllComputers] `
  [-ValidExitCodes <String[]>] `
  -Type <String> `
  -ChocoCommand <String> `
  -PackageName <String> [<CommonParameters>]
New-CCMDeploymentStep `
  -Deployment <String> `
  -Name <String> `
  [-TargetGroup <String[]>] `
  [-ExecutionTimeoutSeconds <String>] `
  [-FailOnError] `
  [-RequireSuccessOnAllComputers] `
  [-ValidExitCodes <String[]>] `
  -Type <String> [<CommonParameters>]

Description

Adds both Basic and Advanced steps to a Deployment Plan

Aliases

None

Examples

EXAMPLE 1

New-CCMDeploymentStep -Deployment PowerShell -Name 'From ChocoCCM' -TargetGroup WebServers -Type Basic -ChocoCommand upgrade -PackageName firefox

EXAMPLE 2

New-CCMDeploymentStep -Deployment PowerShell -Name 'From ChocoCCM' -TargetGroup All,PowerShell -Type Advanced -Script { $process = Get-Process
>>
>> Foreach($p in $process){
>> Write-Host $p.PID
>> }
>>
>> Write-Host "end"
>>
>> }

EXAMPLE 3

New-CCMDeploymentStep -Deployment PowerShell -Name 'From ChocoCCM' -TargetGroup All,PowerShell -Type Advanced -Script {(Get-Content C:\script.txt)}

Inputs

None

Outputs

None

Parameters

-Deployment <String>

The Deployment where the step will be added

PropertyValue
Aliases
Required?true
Position?named
Default Value
Accept Pipeline Input?false

-Name <String>

The Name of the step

PropertyValue
Aliases
Required?true
Position?named
Default Value
Accept Pipeline Input?false

-TargetGroup [<String[]>]

The group(s) the step will target

PropertyValue
Aliases
Required?false
Position?named
Default Value@()
Accept Pipeline Input?false

-ExecutionTimeoutSeconds [<String>]

How long to wait for the step to timeout. Defaults to 14400 (4 hours)

PropertyValue
Aliases
Required?false
Position?named
Default Value14400
Accept Pipeline Input?false

-FailOnError

Fail the step if there is an error. Defaults to True

PropertyValue
Aliases
Required?false
Position?named
Default ValueTrue
Accept Pipeline Input?false

-RequireSuccessOnAllComputers

Ensure all computers are successful before moving to the next step.

PropertyValue
Aliases
Required?false
Position?named
Default ValueFalse
Accept Pipeline Input?false

-ValidExitCodes [<String[]>]

Valid exit codes your script can emit. Default values are: ‘0’,‘1605’,‘1614’,‘1641’,‘3010’

PropertyValue
Aliases
Required?false
Position?named
Default Value@(‘0’,‘1605’,‘1614’,‘1641’,‘3010’)
Accept Pipeline Input?false

-Type <String>

Either a Basic or Advanced Step

PropertyValue
Aliases
Required?true
Position?named
Default Value
Accept Pipeline Input?false

-ChocoCommand <String>

Select from Install,Upgrade, or Uninstall. Used with a Simple step type.

PropertyValue
Aliases
Required?true
Position?named
Default Value
Accept Pipeline Input?false

-PackageName <String>

The chocolatey package to use with a simple step.

PropertyValue
Aliases
Required?true
Position?named
Default Value
Accept Pipeline Input?false

-Script <ScriptBlock>

A scriptblock your Advanced step will use

PropertyValue
Aliases
Required?true
Position?named
Default Value
Accept Pipeline Input?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 .

Function Reference

NOTE

This documentation has been automatically generated from Import-Module "ChocoCCM" -Force; Get-Help New-CCMDeploymentStep -Full.