How to get target machine's name from Windbg?

I'm just have an interest with this question, and found no possible answer anywhere. When using the windbg 'version' or 'vertarget' command, the 'machine name' field is always empty. Any method to get target machine's name from windbg for either live debug or dump post debug?

0: kd> vertarget
Windows 8 Kernel Version 9200 MP (8 procs) Free x64
Product: WinNt, suite: TerminalServer SingleUserTS
Built by: 9200.16384.amd64fre.win8_rtm.120725-1247
Machine Name: this field is always empty

July 5th, 2013 5:12am

The command is this:

!envvar COMPUTERNAME

What does it show you?

Free Windows Admin Tool Kit Click here and download it now
July 5th, 2013 3:52pm

A, great and smart answer. I rembmer there is a kernel varaible in srv.sys can also show the target computer's name. But your answer is better I think.
July 8th, 2013 10:24pm

Hi,

You can also use srv!SrvComputerName to show the computer name.

More reference: Windbg --How to get the computer name

Regards,

Free Windows Admin Tool Kit Click here and download it now
July 8th, 2013 10:53pm

the srv.sys is not always available (usermode dumps), so the envvar way is better.
July 9th, 2013 1:32am

 the answer is what I wanted.
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2013 5:02am

doesn't work
August 31st, 2015 8:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics