Table of contents
ISE
TOC
Collapse the table of content
Expand the table of content

Reset-ComputerMachinePassword

JuanPablo Jofre|Last Updated: 11/22/2016
|
3 Contributors

SYNOPSIS

Resets the machine account password for the computer.

SYNTAX

Reset-ComputerMachinePassword [-Server <String>] [-Credential <PSCredential>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The Reset-ComputerMachinePassword cmdlet changes the machine account password that the computers use to authenticate to the domain controllers in the domain. You can use it to reset the password of the local computer.

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

PS C:\>Reset-ComputerMachinePassword

This command resets the machine password for the local computer. The command runs with the credentials of the current user.

-------------------------- EXAMPLE 2 --------------------------

PS C:\>Reset-ComputerMachinePassword -Server DC01 -Credential Domain01\Admin01

This command resets the machine password of the local computer using the DC01 domain controller. It uses the Credential parameter to specify a user account that has permission to reset a machine password in the domain.

-------------------------- EXAMPLE 3 --------------------------

PS C:\>Invoke-Command -ComputerName Server01 -ScriptBlock {Reset-ComputerMachinePassword}

This command uses theInvoke-Command cmdlet to run a Reset-ComputerMachinePassword command on the Server01 remote computer.

For more information about remote commands in Windows PowerShell, see about_Remote and Invoke-Command.

PARAMETERS

-Credential

Specifies a user account that has permission in the domain to reset the computer's machine password. The default is the current user.

Type a user name, such as "User01" or "Domain01\User01", or enter a PSCredential object, such as one generated by the Get-Credential cmdlet. If you type a user name, you will be prompted for a password.

This parameter is introduced in Windows PowerShell 3.0.

Type: PSCredential
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: Current user
Accept pipeline input: False
Accept wildcard characters: False

-Server

Specifies the name of a domain controller to use when setting the machine account password.

This parameter is optional. If you omit this parameter, a domain controller is chosen to service the command.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

None

You cannot pipe input to this cmdlet.

OUTPUTS

None

This cmdlet does not generate any output.

NOTES

© 2016 Microsoft