Get‑ComputerName - dsccommunity/DscResource.Common GitHub Wiki
SYNOPSIS
Returns the computer name cross-plattform.
SYNTAX
Get-ComputerName [<CommonParameters>]
DESCRIPTION
Returns the computer name cross-plattform.
The variable $env:COMPUTERNAME
does not exist cross-platform which hinders development and testing on
macOS and Linux.
Instead this command can be used to get the computer name
cross-plattform.
EXAMPLES
EXAMPLE 1
Get-ComputerName
Returns the computer name regardless of platform.
PARAMETERS
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.