ps/Modules/Alkami.PowerShell.Common/Public/Import-TeamCityModule.ps1
2023-05-30 22:51:22 -07:00

19 lines
478 B
PowerShell

function Import-TeamCityModule {
<#
.SYNOPSIS
Load the TeamCity module in a common way, only load it if it hasn't been loaded yet
#>
[CmdletBinding()]
param (
)
if ($null -eq (Get-Module Alkami.DevOps.TeamCity)) {
try {
(Import-Module Alkami.DevOps.TeamCity -Scope Global) | Out-Null
} catch {
Write-Warning "Could not import AWSPowershell module"
Write-Warning $_.Exception.Message
}
}
}