CmdID

CmdID / PowerShell / Cmdlets / Disable

Disable-LocalUser

Disables a local user account. PowerShell reference

From the PowerShell reference 5 parameters Alias dlu

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Disables a local user account. The Disable-LocalUser cmdlet disables 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.

Disable-LocalUser [-InputObject] <LocalUser[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Disable-LocalUser [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Disable-LocalUser [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Disable an account by specifying a name

Disable-LocalUser -Name "Admin02"Identify

Disable an account by using the pipeline

Get-LocalUser Guest | Disable-LocalUserIdentify

Its page in the reference: Disable-LocalUser.

Parameters

5 in the PowerShell reference
-InputObjectSpecifies an array of user accounts that this cmdlet disables. To obtain a user account, use the Get-LocalUser cmdlet.
-NameSpecifies an array of names of the user accounts that this cmdlet disables.
-SIDSpecifies an array of user accounts that this cmdlet disables.
-ConfirmPrompts you for confirmation before running the cmdlet.
-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.