Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Can anyone show me a good example of how to match it. Maybe I misread the documentation a bunch of times, but it does not even some close to how real tools like grep ought to work. The output of the following command, wmic /output:stdout csproduct get identifyingnumber looks like so.

IdentifyingNumber

ABC1234

wmic csproduct get identifyingnumber | findstr with parameters to remove column header | clip

I am not sure what to do because I cannot find an exact example of what I am looking for my batch file since I need the serial enough. Any thoughts?

EDIT: I like PowerShell, but I really need to know how to do this in batch (must be possible) for XP machines as well. I am just surprised I could not figure this out. I mean, this should be simple!

share|improve this question

1 Answer 1

use powershell do the following

gwmi win32_ComputerSystemProduct | ft IdentifyingNumber -hidetableheaders

share|improve this answer
    
Thanks, but was looking for something backwards compatible with some crappy XP images where PS is not installed. I appreciate it though. –  ajstein Sep 19 '11 at 3:21
    
And I am a jerk. I forgot I tagged it win7 and not just windows. I changed that after the fact, but shame on me for not asking the question right! –  ajstein Sep 19 '11 at 3:23
    
if you happen to have 1 win7 workstation you could still use the remote method! –  tony roth Sep 19 '11 at 11:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.