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).

1 Answer 1

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.

1
  • 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
    Commented Aug 30, 2022 at 11:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .