Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 2.15 KB

HelpersSetPowerShellExitCode.md

File metadata and controls

79 lines (49 loc) · 2.15 KB

Set-PowerShellExitCode

Sets the exit code for the PowerShell scripts.

Syntax

Set-PowerShellExitCode `
  [-ExitCode <Int32>] `
  [-IgnoredArguments <Object[]>] [<CommonParameters>]

Description

Sets the exit code as an environment variable that is checked and used as the exit code for the package at the end of the package script.

Notes

This tells PowerShell that it should prepare to shut down.

Aliases

None

Examples

EXAMPLE 1

Set-PowerShellExitCode 3010

Inputs

None

Outputs

None

Parameters

-ExitCode [<Int32>]

The exit code to set.

Property Value
Aliases
Required? false
Position? 1
Default Value 0
Accept Pipeline Input? false

-IgnoredArguments [<Object[]>]

Allows splatting with arguments that do not apply. Do not use directly.

Property Value
Aliases
Required? false
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 http://go.microsoft.com/fwlink/p/?LinkID=113216 .

[[Function Reference|HelpersReference]]

NOTE: This documentation has been automatically generated from Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Set-PowerShellExitCode -Full.

View the source for Set-PowerShellExitCode