WMIConn.UserName 속성

정의

Windows 인증을 사용하지 않는 경우 연결에 대한 사용자 이름을 가져오거나 설정합니다.

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

속성 값

연결에 대한 사용자 이름을 포함하는 문자열입니다.

예제

다음 코드 예제에서는 패키지에 WMI 연결을 추가하고 , UserNamePassword 속성을 설정합니다ServerName. 애플리케이션의 속성에 적절한 값을 제공하려면 코드 예제를 수정해야 합니다.

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 인증을 사용하지 않는 경우 연결에 대한 사용자 이름과 암호를 제공해야 합니다.

적용 대상