Skip to content

Instantly share code, notes, and snippets.

View rpresser's full-sized avatar

Ross Presser rpresser

View GitHub Profile
@davidroberts63
davidroberts63 / TlsThumbprintForOctopusUse.ps1
Created July 5, 2022 14:18
Gets the most recent thumbprint of a TLS certificate on a Windows host for use within Octopus Deploy processes.
function FindTlsThumbprintToUse
{
param(
[String]$VariableName = "TlsThumbprint"
)
$thumbprint = Get-ChildItem -Path cert:\LocalMachine\My\* -EKU "Server Authentication" |
Where-Object {
# The last where, for -eq $true helps avoid returning a null object in some cases.
$_.DnsNameList -and ($_.DnsNameList.punycode.endswith(".yourtlddomain.here") | Where-Object { $_ -eq $true })
@Dalmirog-zz
Dalmirog-zz / octo-artifacts.ps1
Last active December 18, 2019 19:48 — forked from rirl/octo-artifacts.ps1
Download ALL artifacts for a given deployment from Octopus Deploy to the artifacts directory
# Try it in powershell...
[Reflection.Assembly]::LoadFile("C:\Program Files\Octopus Deploy\Tentacle\Newtonsoft.Json.dll")
[Reflection.Assembly]::LoadFile("C:\Program Files\Octopus Deploy\Tentacle\Octopus.Client.dll")
[Reflection.Assembly]::LoadFile("C:\Program Files\Octopus Deploy\Tentacle\Octopus.Platform.dll")
# Basic data
Write-Host "Setup..."
$octoKey=" Your API Key"
$octoUser=" Your user name"
$octoId=" Your deployment id, ie (deployments-1492)"