1

wmic /node:@PC-list.txt os get csname,installdate

Command above yields this error:

Failed to open Node-list file (Please check the filename).

gregg
  • 597
  • 3
  • 9
  • 26

1 Answers1

1

Quoting the filename resolved: wmic /node:@"PC-list.txt" os get csname,installdate

wmic doesn't like dashes/hyphens, I'd cite a Microsoft article on it, but I couldn't quickly find one detailing this. Error when hostname has a dash: Invalid Global Switch.

gregg
  • 597
  • 3
  • 9
  • 26
  • 1
    The same problem seems to happen with hostnames too. The fix is the same, e.g. change `/node:my-server` with `/node:"my-server"` – mwfearnley Aug 30 '22 at 11:38