Partager via


Change a User Object to an inetOrgPerson Object (or the Reverse)

Applies To: Windows Server 2008 R2

This topic explains how to use the Active Directory module for Windows PowerShell to convert a user object to an object in the inetOrgPerson class (or the reverse).

Example 1

The following example demonstrates how to convert the user object, SaraDavis, to an inetOrgPerson object:

Set-ADUser SaraDavis -Add @{objectClass='inetOrgPerson'}

Example 2

The following example demonstrates how to convert the inetOrgPerson object, SaraDavis, to a user object.

Set-ADUser SaraDavis -Remove @{objectClass='inetOrgPerson'}

Additional information

You can use the following parameters when you set many of the common values that are associated with the user object in Active Directory Domain Services (AD DS):

  • -AccountExpirationDate

  • -AccountNotDelegated

  • -AccountPassword

  • -AllowReversiblePasswordEncryption

  • -CannotChangePassword

  • -ChangePasswordAtLogon

  • -Enabled

  • -PasswordNeverExpires

  • -PasswordNotRequired

  • -SmartcardLogonRequired

  • -TrustedForDelegation

  • -DisplayName

  • -GivenName

  • -Initials

  • -OtherName

  • -Surname

  • -Description

  • -City

  • -Country

  • -POBox

  • -PostalCode

  • -State

  • -StreetAddress

  • -Company

  • -Department

  • -Division

  • -EmployeeID

  • -EmployeeNumber

  • -Manager

  • -Office

  • -Organization

  • -Title

  • -Fax

  • -HomePhone

  • -MobilePhone

  • -OfficePhone

  • -EmailAddress

  • -HomeDirectory

  • -HomeDrive

  • -HomePage

  • -ProfilePath

  • -ScriptPath

  • -Certificates

  • -LogonWorkstations

  • -PermittedLogonTimes

  • -UserPrincipalName

  • -ServicePrincipalNames

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