SetProxySetting method of the Win32_Proxy class
The SetProxySetting WMI class method creates a persistent Internet connection for Windows Product Activation (WPA) using the specified address and port number.
This topic uses Managed Object Format (MOF) syntax. For more information about using this method see Calling a Method.
Syntax
uint32 SetProxySetting( [in] string ProxyAddress, [in] string ProxyPortNumber );
Parameters
- ProxyAddress [in]
-
Server name or IP address of the proxy server.
- ProxyPortNumber [in]
-
Proxy port number.
Remarks
Because the proxy server setting is persistent, it may be advisable to query the class's properties before calling SetProxySetting. The original properties could then be restored if required.
This method is the scriptable equivalent to setting the proxy server using the Connections tab of the Internet Options dialog in Internet Explorer or in Control Panel.
Note Windows Product Activation is not available on the Itanium-based versions of the Windows operating system.
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/19/2012
