function Get-EnvironmentDesignation { <# .SYNOPSIS Wrapper for Get-AppSetting for Environment.Designation .PARAMETER ComputerName [string] The remote computer to connect to. Defaults to localhost. #> [CmdletBinding()] [OutputType([string])] param ( [Parameter(Mandatory = $false)] [string]$ComputerName ) $logLead = (Get-LogLeadName) if ([string]::IsNullOrWhiteSpace($ComputerName)) { Write-Warning "$logLead : ComputerName is null or whitespace, assigning 'localhost' to ComputerName" $ComputerName = 'localhost' } $params = @{ Key = "Environment.Designation" ComputerName = $ComputerName } $appSetting = Get-AppSetting @params Write-Verbose "$logLead : ComputerName: [$ComputerName] App Setting value: [$appSetting]" return $appSetting }