I'm hitting my head against the wall and I can't google anything that helps.

I am trying to write a VB.net app to check the status of the TPM on laptops, but I cannot get the out parameters to work. If life were simple, this would work:
 Code:
    Public Sub GetTPM()
        Dim colItems As New ManagementObjectSearcher("\\.\ROOT\CIMV2\Security\MicrosoftTpm", "SELECT * FROM Win32_ProviderEx Where Name=""Win32_TpmProvider""")
        For Each objItem As ManagementObject In colItems.Get()


            'Dim TPMActivated As Object = objItem.InvokeMethod("IsActivated", Nothing, Nothing)
            'Dim TPMEnabled As Object = objItem.InvokeMethod("IsEnabled", Nothing, Nothing)
            'Dim TPMOwned As Object = objItem.InvokeMethod("IsOwned", Nothing, Nothing)

            ' TextBox2.Text = TPMActivated.ToString
        Next

    End Sub


Needless to say, it doesn't. I have the bitlocker portion reading the data correctly, so I doubt it is permissions at all.

This if the ref page, but there isn't much for me to go on. If someone has any helpful tips I'd appreciate it.

https://msdn.microsoft.com/en-us/library/aa376454(v=vs.85).aspx
_________________________
How to ask questions the smart way <-----------> Before you ask