Modifying the Attributes of a Computer Account

Applies To: Windows Server 2008 R2

This topic explains how to use the Active Directory module for Windows PowerShell to modify the attributes of a computer object.

Example

The following example demonstrates how to modify the ManagedBy attribute of the computer FABRIKAM-SRV1.

Set-ADComputer FABRIKAM-SRV1 -ManagedBy 'CN=SQL Administrator 01,OU=UserAccounts,OU=Managed,DC=FABRIKAM,DC=COM'

Additional information

You can use the following parameters when you set many of the common values that are associated with computer management.

  • -Description

  • -DisplayName

  • -DNSHostName

  • -Enabled

  • -Location

  • -ManagedBy

  • -OperatingSystem

  • -OperatingSystemHotfix

  • -OperatingSystemServicePack

  • -OperatingSystemVersion

  • -ServicePrincipalNames

  • -TrustedForDelegation

For a full explanation of the parameters that you can pass to Set-ADComputer, at the Active Directory module command prompt, type Get-Help Set-ADComputer –detailed, and then press ENTER.