Linguaggio

WMIConn.ServerName Proprietà

Definizione

Ottiene o imposta il nome del server a cui connettersi come connessione WMI.

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

Valore della proprietà

Una stringa che contiene il nome del server a cui connettersi come connessione WMI.

Esempio

Il seguente esempio di codice aggiunge una connessione WMI a un pacchetto e imposta le ServerNameproprietà , Namespace, e UseWindowsAuth .

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)  

Si applica a