13 lines
294 B
PowerShell
13 lines
294 B
PowerShell
function Get-LocalComputerName {
|
|
<#
|
|
.SYNOPSIS
|
|
Retrieves the name of the local computer.
|
|
#>
|
|
[CmdletBinding()]
|
|
param()
|
|
|
|
process {
|
|
# Using cross-platform .NET method for native speed and compatibility
|
|
return [System.Environment]::MachineName
|
|
}
|
|
} |