Share via


ConnectionOptions.Password 屬性

定義

設定指定使用者的密碼。

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

屬性值

傳回 String 值,這個值用於連接 WMI 時所需的密碼。

備註

空白字串 (“”“) 指定有效的長度為零的密碼。

以硬式編碼密碼是安全性威脅。 使用安全性預防措施,例如加密密碼,或在設定 Password 屬性時提示使用者輸入密碼。

屬性值

預設值是 null。 如果使用者名稱也是 null,則所使用的認證將會是目前登入用戶的認證。

.NET Framework 安全性

完全信任立即呼叫者。 這個成員無法供部分信任的程式碼使用。 如需詳細資訊,請參閱 使用部分信任程式代碼的連結庫

適用於