@COMPUTERNAME[n] - Returns a DNS or NetBIOS name associated with the local computer. The names are created at startup time. The type of name to be retrieved is specified by n:

 

0The NetBIOS name of the local computer or the cluster associated with the local computer
1The DNS name of the local computer or the cluster associated with the local computer
2The name of the DNS domain assigned to the local computer or the cluster associated with the local computer.DNS
3The fully qualified DNS name that uniquely identifies the local computer or the cluster associated with the local computer
4The NetBIOS name of the local computer
5The DNS host name of the local computer
6The name of the DNS domain assigned to the local computer
7The fully qualified DNS name that uniquely identifies the computer

 

Examples:

 

echo %computername[0]

MSI-PC