Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Add-Computer

Add-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
Add the local computer to a domain or workgroup.

Add-Computer [-DomainName] <string> [-Credential <PSCredential>] [-OUPath <string>] [-Server <string>] [-Unsecure] 
    [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]
    Add-Computer [-WorkGroupName] <string> [-Credential <PSCredential>] [-PassThru] [-Confirm] [-WhatIf] [<CommonParame

The Add-Computer cmdlet adds the local computer to a domain or workgroup, or moves it from one domain to another. It also creates a domain account if the computer is added to the domain without an account.
You can use the parameters of this cmdlet to specify an organizational unit (OU) and domain controller or to perform an unsecure join.
To get the results of the command, use the Verbose and PassThru parameters.