Created
September 21, 2017 01:30
-
-
Save KennethBates/4d885cdf7f3adc6f738c7934e769b360 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#The -IncludeUsage switch will populate $VariableSet.Usage with the name of the projects using the LVS | |
#If -IncludeUsage is not passed, .usage will always be empty | |
Set-OctopusConnectionInfo -Server http://OctoServer -ApiKey API-XXX | |
$VariableSets = Get-OctopusVariableSet -LibrarySetName * -IncludeUsage | |
foreach($VariableSet in $VariableSets){ | |
Write-Output "`nVariable set [$($VariableSet.LibraryVariableSetName)] is being used by projects" | |
foreach($project in $VariableSet.Usage){ | |
"--$project" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment