Listing 2: Examples of How to Use the GetWmiProperty Function ' BEGIN CALLOUT A ' BEGIN COMMENT ' Code that retrieves the local machine's OS version. ' END COMMENT WScript.Echo GetWmiProperty(".", "Win32_OperatingSystem", "BuildNumber") ' END CALLOUT A ' BEGIN CALLOUT B ' BEGIN COMMENT ' Code that retrieves PC01's service pack version. ' END COMMENT WScript.Echo GetWmiProperty("PC01", "Win32_OperatingSystem", _ "ServicePackMajorVersion") ' END CALLOUT B ' BEGIN CALLOUT C ' BEGIN COMMENT ' Code that retrieves the local machine's registered user and organization. ' END COMMENT WScript.Echo GetWmiProperty(".", "Win32_OperatingSystem", "RegisteredUser") WScript.Echo GetWmiProperty(".", "Win32_OperatingSystem", "Organization") ' END CALLOUT C ' BEGIN CALLOUT D ' BEGIN COMMENT ' Code that retrieves how much physical memory (in MB) is installed ' on the local machine. ' END COMMENT WScript.Echo GetWmiProperty(".", "Win32_ComputerSystem", _ "TotalPhysicalMemory")/1024/1024 ' END CALLOUT D ' BEGIN CALLOUT E ' BEGIN COMMENT ' Code that retrieves the local machine's roles in the domain. ' END COMMENT WScript.Echo GetWmiProperty(".", "Win32_ComputerSystem", "DomainRole") ' END CALLOUT E ' BEGIN CALLOUT F ' BEGIN COMMENT ' Code that retrieves the local machine's roles in the IT environment. ' END COMMENT WScript.Echo Join(GetWmiProperty(".", "Win32_ComputerSystem", "Roles")) ' END CALLOUT F