cancel
Showing results for 
Search instead for 
Did you mean: 

vmquery for Windows

newbie_girl
Level 3


I would like to create a report that lists all the mediaID that are currently IN the library and have valid images.

I issued the below command on our Unix master and its output was what I was looking for:

vmquery -rt ACS -w | awk '{print $1,$3,$4,$8,$9,$11}'

Can someone please provide a similar command for a Windows master?  I know there is no awk for windows, but thought someone else might have an alternative?   Or an existing script for what I am looking for? 

Thank you!!

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
Try '-bx' instead of -w.
It produces 12 columns with the following headings:
media ID;  media type; robot #; robot slot;  robot side/face; volume group; optical partner; # mounts/cleanings;  last mount time; assigned time; pool


View solution in original post

4 REPLIES 4

Darren_Dunham
Level 6
How does that command tell you anything about valid images on the media?

My solution is to install cygwin.  It gives you awk and other unix tools that you can run in a cygwin shell.  Other toolsets like Microsofts SFU would be similar.

Or you can just dump the first part of the command to a file and massage it on another machine.

--
Darren

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
Try '-bx' instead of -w.
It produces 12 columns with the following headings:
media ID;  media type; robot #; robot slot;  robot side/face; volume group; optical partner; # mounts/cleanings;  last mount time; assigned time; pool


Yasuhisa_Ishika
Level 6
Partner Accredited Certified
I'm on the way to home now, so I can not test this sample. When you include this line into your .bat file replace % with "%%". for /F "tokens=1,3,4,8,9,11" %a in ('vmquery -rt ACS -w') do echo %a %b %c %d %e %f

FrSchind
Level 5
Partner
try the unix tools for windows: http://unxutils.sourceforge.net/ - they help a lot, but the quoting and escaping might be a bit different under windows ;)