Function Test-IsMicServer { <# .SYNOPSIS Used to determine if the current server is a Microservice server. .PARAMETER ComputerName [string] Optional. Specify a computer name instead of inspecting the local computer name. #> [CmdletBinding()] [OutputType([System.Boolean])] param( [Parameter(Mandatory = $false)] [string]$ComputerName = $null ) if ([string]::IsNullOrWhiteSpace($ComputerName)) { $ComputerName = (Get-FullyQualifiedServerName) } # Then let's check the server name if ($ComputerName.ToUpper().StartsWith("MIC")) { return $true } # Put any future checks here return $false } Set-Alias IsMicroServer Test-IsMicServer -Force -Scope:Global Set-Alias Test-IsMicroServer Test-IsMicServer -Force -Scope:Global