PackageDeployment Module Help

Package Deployment Module

Set-LocalUserFlags Cmdlet

Version 4.0.0.5

Set-LocalUserFlags

Synopsis

Change Flags for a Local User Account

Syntax

Set-LocalUserFlags [-Name] <String> [[-Context] <String>] [-ContinueOnError] [-Disabled] [-PasswordNeverExpires] [-UserMayNotChangePassword] [<CommonParameters>]

Description

Use this command to modify the properties (account policies) of a 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

1

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

-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

-Name <String>

Enter the user account name.

Required

True

Position

0

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".