Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Remove-Computer

Remove-Computer - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Remove the local computer from a workgroup or domain.

Remove-Computer [[-Credential] <PSCredential>] [-Force] [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]

The Remove-Computer cmdlet removes the local computer from its current workgroup or domain. 

When you remove a computer from a domain, Remove-Computer also disables the computer's domain account.

When the computer is in a domain, you must provide credentials, even when they are the credentials of the current u
ser, and you must restart the computer to make the change effective. 

To get the results of the command, use the Verbose and PassThru parameters.