Condividi tramite


WMIConn.Namespace Property

Definition

Gets or sets the WMI namespace.

public:
 property System::String ^ Namespace { System::String ^ get(); void set(System::String ^ value); };
public string Namespace { get; set; }
member this.Namespace : string with get, set
Public Property Namespace As String

Property Value

A String that contains the WMI namespace.

Examples

The following code example adds a WMI connection to a package, and sets the ServerName, Namespace, and UseWindowsAuth properties.

ConnectionManager WmiConn = pkg.Connections.Add("WMI");  
DtsProperty prop = WmiConn.Properties["ServerName"];  
prop.SetValue(WmiConn, @"\\localhost");  
WmiConn.Properties["Namespace"].SetValue(WmiConn, @"\root\myfolder");  
WmiConn.Properties["UseWindowsAuth"].SetValue(WmiConn, true);  
Dim WmiConn As ConnectionManager =  pkg.Connections.Add("WMI")   
Dim prop As DtsProperty =  WmiConn.Properties("ServerName")   
prop.SetValue(WmiConn, "\\localhost")  
WmiConn.Properties("Namespace").SetValue(WmiConn, "\root\myfolder")  
WmiConn.Properties("UseWindowsAuth").SetValue(WmiConn, True)  

Applies to