How to enable an Active Directory computer account using PowerShell

To enable an Active Directory computer object using PowerShell, either the Enable-ADAccount or Set-ADComputer cmdlet can be used. This article explains how to enable an AD computer account using these PowerShell commandlets and also using ADManager Plus, a purely GUI-based Active Directory, Office 365 and Exchange management and reporting tool. This article also shows how easy it is to enable an AD computer account with ADManager Plus compared to PowerShell.

Windows PowerShell

Steps to enable an AD computer account using PowerShell.

  • Ensure you have the necessary permissions to perform this action, and also to execute PowerShell scripts.
  • Get the value for necessary attributes like the the sAMAccountName, distinguished name, GUID, SID, etc. which help identity the relevant computer account uniquely.
  • Create the script using the Enable-ADAccount cmdlet, or Set-ADComputer cmdlet and execute it in the PowerShell window.

A sample PowerShell script to enable a computer account

Enable-ADAccount -Identity "JohnS-1001"
Set-ADComputer -Identity "JohnS-1001" -Enabled $true
Click to copy entire script

Both these scripts will enable the computer name JohnS-1001

ADManager Plus

ADManager Plus offers purpose-built features for every type of AD object. So, for each object type, it offers an enable option. For example, to enable a user account,

  • Select the Enable/Disable Computers feature, located in User Management.
  • Select the Enable option, the desired domain and the names of computers to be enabled; you can even import the users list from a CSV file, and click Apply.


Enable an Active Directory Computer Object using ADManager Plus

» Start 30-day Free Trial

Limitations of using PowerShell to enable an AD computer account

  • You will not be able to enable AD computer accounts using PowerShell without the permission to create a computer object and also the permission to execute the script. With ADManager Plus, users privileges in native AD doesn't have to be elevated to enable AD accounts.
  • If you wish to user PowerShell to enable computer accounts in bulk or use a CSV file to enable multiple AD accounts using PowerShell, the script has to be modified. With ADManager Plus though, as the import CSV option is built-in, you can use the enable computers feature to enable just one account or multiple accounts at once.
  • You must know how to run the scripts from the PowerShell window. ADManager Plus is purely GUI-based, allowing you to perform all management and reporting actions with just mouse clicks from its web-based console.
  • Even a misplaced hyphen, a typo in the LDAP names or lack of sufficient permission to configure any of the attributes used in the script will lead to errors. As all actions in ADManager Plus are GUI-driven, there is no need to write scripts, eliminating the chances of errors.

Manage Active Directory computer settings in bulk with ADManager Plus' bulk management feature.

  Get 30-day free trial.
  • Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thanks
  • Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link