CmdID / PowerShell / Cmdlets / Enable
Enable-LocalUser
Enables a local user account. PowerShell reference
From the PowerShell reference
5 parameters
Alias elu
What it does
Enables a local user account. The Enable-LocalUser cmdlet enables local user accounts. When a user account is disabled, the user cannot log on. When a user account is enabled, the user can log on. NOTE: The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit system.
Enable-LocalUser [-InputObject] <LocalUser[]> [-WhatIf] [-Confirm] [<CommonParameters>]Enable-LocalUser [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]Enable-LocalUser [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Enable an account by specifying a name
Enable-LocalUser -Name "Admin02"IdentifyEnable an account by using the pipeline
Get-LocalUser -Name "Administrator" | Enable-LocalUserIdentifyIts page in the reference: Enable-LocalUser.
Parameters
-InputObjectSpecifies an array of user accounts that this cmdlet enables. To obtain a user account, use the
Get-LocalUser cmdlet.-NameSpecifies an array of names of the user accounts that this cmdlet enables.-SIDSpecifies an array of user accounts that this cmdlet enables.-ConfirmPrompts you for confirmation before running the cmdlet.-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.