< Back

Set-OctopusToolPath

Sat Jan 18, 2020 5:31 pm

NAME Set-OctopusToolPath



SYNOPSIS

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





SYNTAX

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



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





DESCRIPTION

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

-Version <string>

Sets the value of the default Octo.exe based on the version of it found by Get-OctopustoolsVersion



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <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



Required? true

Position? 0

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

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





OUTPUTS

None





---------- EXAMPLE 1 ----------



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



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

---------- EXAMPLE 2 ----------



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



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

version

---------- EXAMPLE 3 ----------



PS C:\\>Get-OctopusToolsVersion -latest | Set-OctopusToolPath



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

with its path



RELATED LINKS

WebSite: http://Octoposh.net

Github Project: https://github.com/Dalmirog/OctoPosh/

Wiki: http://octoposh.readthedocs.io

QA and Feature requests: https://gitter.im/Dalmirog/OctoPosh#initial