Setting Namespace Security with the WMI Control

The WMI Control is an MMC snap-in located in the Control Panel and is used to set WMI namespace security manually on a local computer. You can also set the default namespace for scripting.

The following procedure describes how to locate the WMI Control.

Aa393613.wedge(en-us,VS.85).gifTo locate the WMI control

  1. In the Control Panel, double-click Administrative Tools.
  2. In the Administrative Tools window, double-click Computer Management.
  3. In the Computer Management window, expand the Services and Applications tree and double-click the WMI Control.
  4. Right-click the WMI Control icon and select Properties.

The following procedure describes how to use the WMI control to set up the security for a namespace as a template, then programmatically obtain the security settings to set security for other namespaces.

Aa393613.wedge(en-us,VS.85).gifTo set namespace security with the WMI control

  1. Create a new namespace by using Managed Object Format (MOF) code.
  2. Run the WMI Control to set the security on the new namespace. On the Start menu, click Run and type wmimgmt.msc or see Locating the WMI Control.
  3. In the WMI Control pane, right-click WMI Control, choose Properties, and then select the Security tab.
  4. Navigate to the new namespace, click Security, and then configure groups and permissions for the namespace.

You can also use Windows Management Instrumentation Command-Line (WMIC) to set namespace security. For more information, see wmic.

Windows 2000 and Windows NT 4.0:  WMIC is not available.

Setting the Default Namespace for Scripts

If a script does not connect explicitly to a namespace when connecting to WMI, then WMI uses the default namespace specified in this control. The default is also found in the registry entry as follows:

HKEY_LOCAL_MACHINE
    SOFTWARE
        Microsoft
            WBEM
                Scripting
                    Default
                        Namespace
Because the default namespace is easy to change, either with this control or programmatically by calling methods of StdRegProv, specify the namespace when connecting to WMI either through the moniker or calls to SWbemLocator.ConnectServer. For more information, see Creating a WMI Script

Aa393613.wedge(en-us,VS.85).gifTo set the default namespace for scripts

  1. In the WMI Control Properties window, choose the Advanced tab.
  2. Click the Change button and select the namespace to make the default.

See Also

Setting Namespace Security Descriptors

Send comments about this topic to Microsoft

Build date: 11/3/2009

Tags :


Page view tracker