PowerShell Set-ADComputer: Modify AD Computer Objects
• 1 min read
powershell active-directory set-adcomputer computer-management tutorial
PowerShell Set-ADComputer: Complete Guide to Modifying AD Computers
Overview
The Set-ADComputer cmdlet modifies properties of computer objects in Active Directory. Used for updating descriptions, locations, and other computer attributes.
Common Tasks:
- Update computer descriptions
- Change computer location
- Enable/disable computers
- Modify computer properties
- Bulk update multiple computers
Prerequisites:
- PowerShell 5.1 or later
- Active Directory PowerShell module
- Administrator or delegated permissions
Syntax
Set-ADComputer [-Identity] <ADComputer> [-Description <string>] [-Location <string>] [-Enabled <bool>]
```powershell
---
## Examples
### Example 1: Update Description
```powershell
Set-ADComputer -Identity "WS-NYC-001" -Description "Updated: Assigned to John Smith"
```powershell
### Example 2: Change Location
```powershell
Set-ADComputer -Identity "WS-NYC-001" -Location "New York Office - 3rd Floor"
```powershell
### Example 3: Enable Computer
```powershell
Set-ADComputer -Identity "WS-NYC-001" -Enabled $true
```powershell
### Example 4: Disable Computer
```powershell
Set-ADComputer -Identity "WS-NYC-001" -Enabled $false
```powershell
### Example 5: Bulk Update Description
```powershell
Get-ADComputer -Filter "location -eq 'Old Location'" |
Set-ADComputer -Location "New Location"
```powershell
### Example 6: Update with User Assignment
```powershell
$computer = Get-ADComputer "WS-NYC-001"
$user = Get-ADUser "jsmith"
Set-ADComputer -Identity $computer `
-Description "Assigned to: $($user.Name) ($($user.SamAccountName))"
```powershell
---
## Best Practices
✅ **Update descriptions** - Track computer purpose and assignment
✅ **Set locations** - Organize by physical location
✅ **Log changes** - Record modifications
✅ **Verify changes** - Confirm updates applied
---
## Related Commands
- **[Get-ADComputer](/powershell-get-adcomputer)** - Query computers
- **[New-ADComputer](/powershell-new-adcomputer)** - Create computers
- **[Remove-ADComputer](/powershell-remove-adcomputer)** - Delete computers
---
## See Also
- **[Get-ADComputer](/powershell-get-adcomputer)** - Query computers
- **[Active Directory Computer Management](/active-directory-computer-management)** - Computer guide
---
**Last Updated:** February 6, 2026
**Difficulty Level:** Intermediate
**Reading Time:** 8 minutes