Why does hostname appear in wmic output of netuse?

1

When I use wmic as shown below, my hostname appears as the first field in the output. I did not do anything to ask for the hostname. Should I just expect that this behaviour will be consistent across all Windows platforms?

C:>wmic netuse get localname,remotename /format:csv

Node,LocalName,RemoteName
CC049105,H:,\\BLUES11\USERS\pwatson
CC049105,J:,\\GREENS01\D
CC049105,K:,\\ARDVARK01\D
CC049105,L:,\\ARDVARK01\C$
CC049105,M:,\\ARDVARK01\D$
CC049105,N:,\\ARDVARK01\F$
CC049105,P:,\\myhost.mycomp.org\ar\Team\docs
CC049105,T:,\\IMPERIAL01\D
CC049105,U:,\\MONEY9\GROUPS

lit

Posted 2016-07-27T14:55:48.463

Reputation: 515

Answers

0

It's because the predefined "CSV" format always includes the Node column.

See the XSL transform file here: %WINDIR%\System32\wbem\en-US\csv.xsl

It's been that way since XP days. Why MS decided to do that, I'm not sure.

Ƭᴇcʜιᴇ007

Posted 2016-07-27T14:55:48.463

Reputation: 103 763