| document type | external help file | HelpUri | Locale | Module Name | ms.date | PlatyPS schema version | title |
|---|---|---|---|---|---|---|---|
cmdlet |
linuxtools-Help.xml |
en-US |
linuxtools |
11/09/2025 |
2024-05-01 |
Update-LocalUser |
Update a local user account
Update-LocalUser [-Name] <string> [[-NewPassword] <securestring>] [[-Comment] <string>]
[[-HomeDirectory] <string>] [[-ShellPath] <string>] [[-GroupID] <int>] [[-AccountExpires] <string>]
[[-UID] <int>] [-Lock] [-Unlock] [-MoveHome] [<CommonParameters>]
This cmdlet has the following aliases, {{Insert list of aliases}}
Update a local user account with new settings
Update-LocalUser -Name "Fu Barr" -Comment "The Fubar of Tarfu" Updates the user account named "Fu Barr" with the comment "The Fubar of Tarfu"
Update-LocalUser -Name "Fu Barr" -HomeDirectory "/home/fubar" -MoveHome Updates the user account named "Fu Barr" with the home directory "/home/fubar" and moves the home directory
Update-LocalUser -Name "Fu Barr" -ShellPath "/bin/zsh" Updates the user account named "Fu Barr" with the shell path "/bin/zsh"
Update-LocalUser -Name "Fu Barr" -GroupID 1001 Updates the user account named "Fu Barr" with the group ID 1001
Update-LocalUser -Name "Fu Barr" -AccountExpires "5/1/2025" Updates the user account named "Fu Barr" with the account expiration date of May 1, 2025
Update-LocalUser -Name "Fu Barr" -NewPassword (ConvertTo-SecureString -String "P@ssw0rd" -AsPlainText -Force) Updates the user account named "Fu Barr" with the new password "P@ssw0rd"
Update-LocalUser -Name "Fu Barr" -Lock Locks the user account named "Fu Barr"
Update-LocalUser -Name "Fu Barr" -Unlock Unlocks the user account named "Fu Barr"
Optional. Date when the account expires. Use 'MM/dd/yyyy' format.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 6
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. Comment to assign to the user account.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. New group ID for the user.
Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 5
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. New home directory for the user.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. Lock the user account. Ignores -NewPassword
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. Move the home directory to the new location.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Name of the user to update
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. New password for the user. Must be a secure string. This parameter is ignored if -Lock or -Unlock is used.
Type: System.Security.SecureString
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. New shell path for the user.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. New user ID
Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 7
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. Unlock the user account. Ignores -NewPassword
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.