SWbemLocator object
Applies to: desktop apps only
You can use the methods of the SWbemLocator object to obtain an SWbemServices object that represents a connection to a namespace on either a local computer or a remote host computer. You can then use the methods of the SWbemServices object to access WMI. This object can be created by the VBScript CreateObject call.
Members
The SWbemLocator object has these types of members:
Methods
The SWbemLocator object has these methods.
| Method | Description |
|---|---|
| ConnectServer |
Connects to WMI on the specified computer. |
Properties
The SWbemLocator object has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only |
Used to read or change the security settings. |
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Type library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/9/2012
$NameSpace = 'root\ccm'
$ComputerName = 'sccm.company.com'
$WbemLocator = New-Object -ComObject "WbemScripting.SWbemLocator"
$WbemServices = $WbemLocator.ConnectServer($ComputerName, $Namespace)
$WbemClasses = $WbemServices.SubclassesOf()
$WbemClasses
- 5/21/2012
- Jeffrey S. Patton