UtilUserAccountAdd(String, String, String, String, Boolean, Boolean, WellKnownSidType) Method
Adds a new user account in the current machine context.
Namespace: DevCase.Core.Windows.UsersAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void Add(
string username,
string password,
string displayName,
string description,
bool canChangePwd,
bool pwdExpires,
WellKnownSidType groupSid = WellKnownSidType.BuiltinUsersSid
)
Public Shared Sub Add (
username As String,
password As String,
displayName As String,
description As String,
canChangePwd As Boolean,
pwdExpires As Boolean,
Optional groupSid As WellKnownSidType = WellKnownSidType.BuiltinUsersSid
)
Dim username As String
Dim password As String
Dim displayName As String
Dim description As String
Dim canChangePwd As Boolean
Dim pwdExpires As Boolean
Dim groupSid As WellKnownSidType
UtilUserAccount.Add(username, password, displayName,
description, canChangePwd, pwdExpires,
groupSid)
public:
static void Add(
String^ username,
String^ password,
String^ displayName,
String^ description,
bool canChangePwd,
bool pwdExpires,
WellKnownSidType groupSid = WellKnownSidType::BuiltinUsersSid
)
static member Add :
username : string *
password : string *
displayName : string *
description : string *
canChangePwd : bool *
pwdExpires : bool *
?groupSid : WellKnownSidType
(* Defaults:
let _groupSid = defaultArg groupSid WellKnownSidType.BuiltinUsersSid
*)
-> unit
No code example is currently available or this language may not be supported.
Parameters
- username String
-
The user name.
- password String
-
The user password.
If this value is empty, account is set to don't require any password.
- displayName String
-
The display name of the user account.
- description String
-
The description of the user account.
- canChangePwd Boolean
-
A value that indicates whether the user can change its password.
- pwdExpires Boolean
-
A value that indicates whether the password should expire.
- groupSid WellKnownSidType (Optional)
-
A WellKnownSidType security identifier (SID) that determines the account group where to add the user.
This is a code example.
No code example is currently available or this language may not be supported.
UserAccounts.Add(username:="Elektro",
password:="",
displayName:="Elektro Account.",
description:="This is a test user-account.",
canChangePwd:=True,
pwdExpires:=False,
groupSid:=WellKnownSidType.BuiltinAdministratorsSid)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.