' Create a Console Folder
Option Explicit
Dim objSWbemLocator
Dim objSWbemServices
Dim ProviderLoc
Dim Location
Dim objNewConsoleFolder
set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
set objSWbemServices= objSWbemLocator.ConnectServer _
("COMPUTER NAME", "root\sms")
Set ProviderLoc = objSWbemServices.InstancesOf("SMS_ProviderLocation")
For Each Location In ProviderLoc
If Location.ProviderForLocalSite = True Then
Set objSWbemServices = objSWbemLocator.ConnectServer _
(Location.Machine, "root\sms\site_" + Location.SiteCode)
End If
Next
Set objNewConsoleFolder = objSWbemServices.Get("SMS_ObjectContainerNode").SpawnInstance_()
objNewConsoleFolder.Name = "Hardware - Disk"
objNewConsoleFolder.ObjectType=8 ' Report Node.
objNewConsoleFolder.ParentContainerNodeID = 0 'Create in root node.
objNewConsoleFolder.Put_