How can i get proxy settings with wmi?

0

I try this in cmd wmic path win32_proxy,

but get

ERROR: Description = Invalid class

OS: Windows 7 64bit

Am I doing this right?

Vladimir Nani

Posted 2013-12-13T10:12:39.590

Reputation: 103

Answers

1

I think you're doing it quite correctly, but it seems like the class Win32_Proxy isn't available on your computer.

Which, isn't surprising, as it isn't available here either:

PS C:\> gwmi -Class win32_proxy
Get-WmiObject : Invalid class
At line:1 char:5
+ gwmi <<<<  -Class win32_proxy
+ CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

This appears to be because it's no longer available in Windows 7, as it is no longer available post-XP.

End of client support: Windows XP

Thor

Posted 2013-12-13T10:12:39.590

Reputation: 3 562

Do you know what class it is transformed in? – Vladimir Nani – 2013-12-13T12:48:56.057

@VladimirNani I tried looking around, but I couldn't find any class in the 10-minutes of Googling. It seemed like most hinted towards going with native C-functions, which isn't... quite as simple. Otherwise, you're better off using the registry for it. – Thor – 2013-12-13T13:35:35.690

That`s what I did eventually. Thanks. – Vladimir Nani – 2013-12-14T15:22:27.127