Dictionaries/Computer.Dict.OS/Computer.Dict.OS.psm1

<#
.SYNOPSIS
Get the computer name
 
.DESCRIPTION
Return computername without domainname if any
 
.EXAMPLE
$name = Get-ComputerName
 
.NOTES
This function comes from Dict.Windows module.
#>

function Get-ComputerName {
    [CmdletBinding()]Param (
    )
    Begin {
        Write-EnterFunction
    }

    Process {
        return (hostname) -replace "\..*"
    }

    End {
        Write-LeaveFunction
    }
}