Share via


WMIConn.Password プロパティ

定義

Windows 認証を使用しない場合、接続のパスワードを設定します。

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

プロパティ値

接続のパスワードを含む文字列。

次のコード例では、パッケージに WMI 接続を追加し、ServerName プロパティ、UserName プロパティ、および Password プロパティを設定します。 コード例は、アプリケーションに応じた適切な値がプロパティに設定されるように変更する必要があります。

ConnectionManager WmiConn = pkg.Connections.Add("WMI");  
DtsProperty prop = WmiConn.Properties["ServerName"];  
prop.SetValue(WmiConn, @"\\localhost");  
WmiConn.Properties["Username"].SetValue(WmiConn, @"");  
WmiConn.Properties["Password"].SetValue(WmiConn, @"");  
Dim WmiConn As ConnectionManager =  pkg.Connections.Add("WMI")   
Dim prop As DtsProperty =  WmiConn.Properties("ServerName")   
prop.SetValue(WmiConn, "\\localhost")  
WmiConn.Properties("Username").SetValue(WmiConn, @"")  
WmiConn.Properties("Password").SetValue(WmiConn, @"")  

注釈

Windows 認証を使用しない場合、接続に使用するパスワードを入力する必要があります。

適用対象