API Reference
Command
Set-ADXComputer
Updates a single Active Directory computer with typed parameters and custom attribute support.
Examples
Example 1: Update description, ownership, and location for a production server
Set-ADXComputer -Identity 'srv-app-17$' -Domain 'contoso.com' -Description 'Payroll API node 17' -ManagedBy 'CN=Server Provisioning,OU=Groups,DC=contoso,DC=com' -Location 'Warsaw DC' -Office 'DC1' -WhatIf
Example 2: Stamp custom attributes and disable a decommissioned host
Set-ADXComputer -Identity 'srv-rds-05$' -Domain 'contoso.com' -Enabled $false -Attribute @{ extensionAttribute1 = 'Retired'; extensionAttribute10 = '2026-04 wave' } -ClearAttribute managedBy
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Set-ADXComputer -Identity <string> [-Attribute <Hashtable>] [-ClearAttribute <string[]>] [-Description <string>] [-DisplayName <string>] [-DnsHostName <string>] [-Domain <string>] [-Enabled <bool>] [-Location <string>] [-Mail <string>] [-ManagedBy <string>] [-Office <string>] [<CommonParameters>]#Parameters
- Identity string
- Gets or sets computer identity (sAMAccountName, DN, or name). DnsHostName is intentionally excluded to avoid collision with the dedicated update parameter.
- Attribute Hashtable
- Gets or sets arbitrary custom attributes to write.
- ClearAttribute string[]
- Gets or sets attributes to clear.
- Description string
- Gets or sets description.
- DisplayName string
- Gets or sets displayName.
- DnsHostName string
- Gets or sets dNSHostName.
- Domain string
- Gets or sets the optional domain DNS name.
- Enabled bool
- Gets or sets enabled state.
- Location string
- Gets or sets location.
- Mail string
- Gets or sets mail.
- ManagedBy string
- Gets or sets managedBy.
- Office string
- Gets or sets office (physicalDeliveryOfficeName).
Outputs
ADPlayground.DirectoryMutationResult