1 Reply Latest reply on May 15, 2012 7:39 AM by Bill Robinson

    BL NSH Scripts vs VB WMI Scripts

      Hi There


      I've been writing vbscripts to manipulate Windows Servers for years.


      Now I've been given bladelogic.


      Can NSH scripts provide the same functionality as WMI scripts?  For example is there a Win32_DiskPartition equivalent in NSH?


      I was hoping that NSH will provide me with access to all my servers and I will no longer be hampered by firewalls blocking WMI traffic (port 135).

      WMI also failed for other reasons such as the WMI service being in an unuseable state (until the server is restarted)



        • 1. Re: BL NSH Scripts vs VB WMI Scripts
          Bill Robinson

          It depends.  take a look through the NSH Command reference pdf and that will give you some idea of what you can run via NSH.  there is a lot of overlap but wmi and powershell can definitely do more than nsh on a windows system.


          What many people do is use nsh as a wrapper to run wmi and powershell commands if there is no way to get what’s needed via nsh or bsa.  You can have the nsh script chop itself in half, echo the bottom bit, which is all wmi or ps, into another file and than run that file in cscript or ps.


          In that way the wmi/ps will run directly on the box and not have any firewall issues.  I’ve seen many folks favor powershell over wmi recently.