Leveraging WMI Scripting: Using Windows Management Instrumentation to Solve Windows Management Problems

Appendix A: Appendix

Scripts listed in this section are fully documented in Understanding WMI Scripting (ISBN 1555582664) along with the WMI aspects and the scripting techniques they use. Beyond the learning curve they represent, they also offer useful functionalities to pursue our WMI discovery process. That's the reason why they are used many times throughout this second volume dedicated to WMI. The most experienced people in WMI, using this second volume on a standalone basis, can refer to this section to gather more information about these scripts. Again, the scripts are given for reference only. People interested in getting more information about the scripts must refer to Understanding WMI Scripting (ISBN 1555582664).

Sample 4.6: Retrieving all instances of the Win32_Service class with their properties
 1: .: 8: 9:  ..:13:    14:15:    66:  67:
Sample 4.14: Setting one read/write property of a Win32_Registry class instance directly
 1: .: 8: 9:  ..:13:    14:15:    47:  48:
Sample 4.15: Setting one read/write property of a Win32_Registry class instance indirectly
 1: .: 8: 9:  ..:13:    14:15:    52:  53:
Sample 4.30: A generic routine to display the SWbemPropertySet object
  .:  6:' ---------------------------------------------------------------------------------------------  7:Function DisplayProperties (objWMIInstance, intIndent) ..: 14:    Set objWMIPropertySet = objWMIInstance.Properties_ 15:    For Each objWMIProperty In objWMIPropertySet 16: 17:        boolCIMKey = objWMIProperty.Qualifiers_.Item("key").Value 18:        If Err.Number Then 19:       ...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Web Application Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.