How to disable a computer in Active Directory using PowerShell scripts?

Read on to know how to disable a computer account in Active Directory (AD) using PowerShell, and how you can get it done easily with ADManager Plus.

Windows PowerShell

Steps to disable a computer in AD using powershell :

  • Identify the domain in which the computer account to be disabled is located.
  • Create and compile the script for disabling the AD account. Execute the script in PowerShell.
  • Sample script to disable an AD computer account:
  •  Copied
    PS C:\> Disable-ADAccount -Identity fs1$
    Click to copy entire script
  • To disable AD computer accounts in bulk, you have to write a different script.

ADManager Plus

How to disable a computer in Active Directory :

  • Navigate to Management > Computer Management > Bulk Computer Modification.
  • Select the Domain and the Computer Account(s) you wish to disable. You can even import this list from a CSV file.
  • Click Apply to disable the AD accounts selected.

Screenshot

Disable a Computer Account in Active Directory using ADManager Plus

» Start 30-day Free Trial

Although disabling an AD computer account with native tools like PowerShell looks simple, it comes with a few limitations:

  • PowerShell script can be run only from the computers which have the Active Directory Domain Services role installed in them.
  • Need for a new script, in case multiple AD accounts are to be disabled.
  • The syntax, parameters and iterations need to be correct. A typo or incorrect syntax might be difficult to spot and rectify, especially when the script is a long one.
  • Cannot delegate the modification of AD accounts or other AD management tasks to help desk technicians.

ADManager Plus lets you perform the same with a few clicks from its web based GUI console with pre-defined reports to list enabled computers and disable them right from the reports. It also has options for automating disabling of inactive AD accounts.

Manage Active Directory computers in bulk with ADManager Plus.

  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:

Email Download Link