UtilUserAccountCreate Method
Creates a new user account in the current machine context.
This function does NOT adds a new user in the current machine.
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 UserPrincipal Create(
string username,
string password,
string displayName,
string description,
bool canChangePwd,
bool pwdExpires
)
Public Shared Function Create (
username As String,
password As String,
displayName As String,
description As String,
canChangePwd As Boolean,
pwdExpires As Boolean
) As UserPrincipal
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 returnValue As UserPrincipal
returnValue = UtilUserAccount.Create(username,
password, displayName, description,
canChangePwd, pwdExpires)
public:
static UserPrincipal^ Create(
String^ username,
String^ password,
String^ displayName,
String^ description,
bool canChangePwd,
bool pwdExpires
)
static member Create :
username : string *
password : string *
displayName : string *
description : string *
canChangePwd : bool *
pwdExpires : bool -> UserPrincipal
No code example is currently available or this language may not be supported.
- 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.
UserPrincipal
An
UserPrincipal object that contains the user data.
This is a code example.
No code example is currently available or this language may not be supported.
Dim user as UserPrincipal = UserAccounts.Create(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.