Skip to content

Set OctopusToolPath

dalmiro grañas edited this page Apr 1, 2017 · 3 revisions

Summary

This cmdlet sets a version of Octo.exe as default. To get the value of the current default Octo.exe version run Get-OctopusToolPath or simply use $env:OctoExe

In the background [Get-OctopusToolPath] and [Set-OctopusToolPath] simply Get/Set the value of the environment variable $env:OctoExe

Parameters

Name DataType Description
Version System.String Sets the value of the default Octo.exe based on the version of it found by Get-OctopustoolsVersion
Path System.String Sets the value of the default Octo.exe using a literal path. The cmdlet won't validate if the path leads to an existing octo.exe file

Syntax

Set-OctopusToolPath -Version <string> [<CommonParameters>]

Set-OctopusToolPath [-Path] <string> [<CommonParameters>]



Examples

EXAMPLE 1

Sets C:\Tools\1.0.0\Octo.exe as the current default Octo.exe version

PS C:\>PS C:\> Set-OctopusToolPath -path C:\tools\1.0.0\Octo.exe

EXAMPLE 2

Uses Get-OctopusToolVersion to look for Octo.exe version 1.0.0 and then sets its path as the current default version

PS C:\>PS C:\> Set-OctopusToolPath -version 1.0.0

EXAMPLE 3

Gets the latest version of Octo.exe installed on the machine using Get-OctopusToolsVersion and sets $env:OctoExe with its path

PS C:\>PS C:\>Get-OctopusToolsVersion -latest | Set-OctopusToolPath
Clone this wiki locally