Function Test-IsTeamCityProcess { <# .SYNOPSIS Determines if the Current Process is a TeamCity Agent Process .NOTES Will not work except when running in a direct agent process. Checks for TeamCity agent environment variables to exist. #> ## Duplicates some of Alkami.DevOps.Common\Public\Test-IsTeamCityProcess.ps1 [CmdletBinding()] [OutputType([System.Boolean])] Param() $teamCityJREVariable = $ENV:TEAMCITY_JRE if ([String]::IsNullOrEmpty($teamCityJREVariable)) { Write-Verbose "[Test-IsTeamCityProcess] TEAMCITY_JRE User Environment Variable Not Found" return $false } return $true }