PackageDeployment Module Help

Package Deployment Module

New-LocalUser Cmdlet

Version 4.0.0.5

New-LocalUser

Synopsis

Create Local User Account

Syntax

New-LocalUser [-Name] <String> [[-FullName] <String>] [[-Description] <String>] [-ContinueOnError] [-Disabled] [-PasswordNeverExpires] [-UserMayNotChangePassword] [[-Password] <String>] [[-Context] <String>] [<CommonParameters>]

Description

Use this command to create a new local user account.

Parameters

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution in Service context.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
ComputerPerService: Execution in service context; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

4

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

-Description <String>

Enter a description of the user or user account.

Required

False

Position

2

Accepts pipeline input

False

-Disabled <SwitchParameter>

Select this option to prevent the account from being used. You cannot disable the predefined Administrator account.

Required

False

Position

Named

Accepts pipeline input

False

-FullName <String>

Enter the full name of the user account. It is recommended to use the same format when entering the full name; for example all entries start with the last name and are separated by a comma (Last, Jeff) or start with the first name (Jeff Last).

Required

False

Position

1

Accepts pipeline input

False

-Name <String>

Enter the user account name. Enter a unique user account name (you cannot use a name that already exists on the workstation). The name can have up to 20 characters (upper and lower case) with the exception of the following characters: " / \ [ ] : ; | = , + * ? < >. Please note that you should not assign a name consisting only of periods (.) and blanks.

Required

True

Position

0

Accepts pipeline input

False

-Password <String>

Enter the password (up to 14 case-sensitive characters). Then confirm by re-entering this password in the Confirm password text box.

Required

False

Position

3

Accepts pipeline input

False

-PasswordNeverExpires <SwitchParameter>

Select this option if you want to prevent a password from expiring (this option overwrites the Maximum Password Age setting in the Account Policy dialog box). You should check this option if you want to assign a service to the selected user account (for example the Replicator Service). You can select this service by clicking the Service icon on the Control Panel.

Required

False

Position

Named

Accepts pipeline input

False

-UserMayNotChangePassword <SwitchParameter>

Select this option if you do not want the user to change the assigned password. You should use this option if accounts are used by several users. The setting is not valid for members of the local Admins group.

Required

False

Position

Named

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".