Share via


WMIConn.ServerName プロパティ

定義

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

プロパティ値

WMI 接続として接続するサーバーの名前を含む文字列。

次のコード例では、パッケージに WMI 接続を追加し、ServerName プロパティ、Namespace プロパティ、および 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)  

適用対象