Remove-Computer - PowerShell


 

Remove the local computer from a workgroup or domain. (Remove-Computer)

   

# NAME
Remove-Computer

# SYNOPSIS
Remove the local computer from a workgroup or domain.

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

# DESCRIPTION
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 user, and you must restart the computer to make the change effective.

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

# PARAMETERS
-Credential <PSCredential>
Specifies a user account that has permission to perform this action. 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.

To remove a computer from a domain, you must use the Credential parameter, even when you are using the credentials of the current user.

Required? false
Position? 2
Default value The credentials of the current user
Accept pipeline input? false
Accept wildcard characters? false

-Force [<SwitchParameter>]

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-PassThru [<SwitchParameter>]
Returns the results of the command. Otherwise, this cmdlet does not generate any output.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm [<SwitchParameter>]
Prompts you for confirmation before executing the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf [<SwitchParameter>]
Describes what would happen if you executed the command without actually executing the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

# INPUTS
None
You cannot pipe input to this cmdlet

# OUTPUTS
Microsoft.PowerShell.Commands.ComputerChangeInfo
When you use the PassThru parameter, Remove-Computer returns a ComputerChangeInfo object. Otherwise, this cmdlet does not generate any output.

# NOTES

# EXAMPLE 1

C:\PS>remove-computer

# Description
-----------
This command removes the computer from a workgroup.

# EXAMPLE 2

C:\PS>remove-computer -credential domain01\admin01 -passthru -verbose; restart-computer

# Description
-----------
These commands remove the local computer from the domain to which it is joined.

The first command removes the computer from the domain. The command uses the Credential parameter to supply the credentials of a domain administrator. It uses the PassThru parameter and the Verbose common parameter to display information about the success or failure of the command.

The second command uses the Restart-Computer cmdlet to restart the computer, which is required to complete the remove operation.

The semi-colon (;) separates the two commands.

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=135246
Add-Computer
Checkpoint-Computer
Remove-Computer
Restart-Computer
Restore-Computer
Stop-Computer
Test-Connection

C:\Windows>powershell get-help Test-ComputerSecureChannel -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows 10, 8.1, 8, 7, Vista / Windows Server 2016, 2012, 2008
»»»» ColorConsole








Windows-10





Windows-10

... facebook.de
... Windows-10 FAQ
... Windows-10 Info


Become a Sponsor
... Your button here?





PowerShell: Remove the local computer from a workgroup or domain.

HTTP: ... PS_Windows/en/Remove-Computer.htm
0.202
12491

Ähnliche oder gleiche Bilder in verschiedenen Ordnern finden!

 /

Safely remove USB drives via a Windows 8/8.1 or 10 desktop shortcut!

 /

Soccer balls on the desktop even without Sky Receiver!

 /

What for are the Lines and Buttons at the root in Tree-View ?

 /

Hilfe, in Windows-7 wird in der Statusleiste die Dateigröße nicht angezeigt?

 /

Find.Same.Images.OK for Windows find the same or similar images!

 /

Neue Explorer-Tab-Ansicht in Windows 10, 8.1, ... erstellen / öffnen!

 /

Remove File Eraser from Windows (10, 8.1, ...), how to!

 /

Verknüpfung zur Verwaltung drahtloser Netzwerke auf Windows-10?

 /

Run directly minimized to tray excluding to see the main window?

 /

Modify the size of the icons in the task bar of Windows 8.1 and 10!

 /

Alles am Windows Desktop ist verschoben, was kann ich machen!?

 /