Export (0) Print
Expand All

Reset-ComputerMachinePassword

Updated: April 21, 2010

Applies To: Windows PowerShell 2.0

Resets the machine account password for the computer.

Syntax

Reset-ComputerMachinePassword [-Server <string>] [-Confirm] [-WhatIf] [<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.

Parameters

-Server <string>

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.

 

Required?

false

Position?

named

Default Value

None

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This command supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see about_CommonParameters.

Inputs and Outputs

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet returns.

 

Inputs

None

You cannot pipe input to this cmdlet.

Outputs

None

This cmdlet does not generate any output.

Example 1

C:\PS>Reset-ComputerMachinePassword

Description

-----------

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

Example 2

C:\PS>Reset-ComputerMachinePassword -server DC01

Description

-----------

This command resets the machine password of the local computer using the DC01 domain controller.

Example 3

C:\PS>invoke-command -computername Server01 -scriptblock {reset-computermachinepassword}

Description

-----------

This command uses the Invoke-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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft