Execute UWF_Volume WMI Method in Visual Basic

Viewed 40

I'm trying to query a fleet of PCs Unified Write Filter settings and record them into Excel using a VBA macro. I can't seem to work out how to invoke the GetExclusions() WMI method:

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\standardcimv2\embedded")
Set objItems = objWMIService.ExecQuery("SELECT * FROM UWF_Volume WHERE CurrentSession=TRUE AND DriveLetter=" & Chr(34) & "C:" & Chr(34))

For Each objItem In objItems
    
    ' Invoke GetExclusions method
    
Next

This is the method I'm trying to invoke: enter image description here

The error I'm getting is "runtime error not found"

How do I invoke this method?

0 Answers
Related