Skip to content

Latest commit

 

History

History
84 lines (52 loc) · 2.4 KB

swbemobject-properties-.md

File metadata and controls

84 lines (52 loc) · 2.4 KB
description ms.assetid ms.tgt_platform title ms.topic ms.date topic_type api_name api_type api_location
The Properties\_ property of the SWbemObject object returns an SWbemPropertySet object that is a collection of the properties for the current class or instance. This property is read-only.
8dd49678-47e7-4c6b-ab12-42532065eaf2
multiple
SWbemObject.Properties_ property (Wbemdisp.h)
reference
05/31/2018
APIRef
kbSyntax
SWbemObject.Properties_
ISWbemObject.Properties_
ISWbemObject.get_Properties_
COM
Wbemdisp.dll

SWbemObject.Properties_ property

The Properties_ property of the SWbemObject object returns an SWbemPropertySet object that is a collection of the properties for the current class or instance. This property is read-only.

For an explanation of this syntax, see Document Conventions for the Scripting API.

This property is read-only.

Syntax

SWbemObject.Properties_ As Object

Property value

Examples

The following VBScript code example lists the properties for a specified WMI class.

strComputer = "." 
strNameSpace = "root\cimv2" 
strClass = "Win32_Service" 
  
Set objClass = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _  
    strComputer & "\" & strNameSpace & ":" & strClass) 
  
WScript.Echo strClass & " Class Properties" 
WScript.Echo "------------------------------" 
  
For Each objClassProperty In objClass.Properties_ 
    WScript.Echo objClassProperty.Name 
Next 

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Wbemdisp.h
Type library
Wbemdisp.tlb
DLL
Wbemdisp.dll
CLSID
CLSID_SWbemObject
IID
IID_ISWbemObject