4 Replies Latest reply on Jul 12, 2012 8:21 AM by Mike Hibbert

    Running Windows cmd commands from NSH (with nexec)

      Hi,

       

      I would normally run cmd commands against targets by using:

       

      nexec $SERVER cmd /c "commands in here"

       

      However, I would like to run the following cmd command against servers:

       

      wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version|findstr /vi Version > c:\temp\netversion.txt

       

      This just fails obviously because it is interpreting the double quote incorrectly when I combine the two:

       

      nexec $SERVER cmd /c "wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version|findstr /vi Version > c:\temp\netversion.txt"

       

      Can anyone help a guy out?!

       

      Cheers,

      Mike