Setting a User's Profile Attributes
This topic explains how to use the Active Directory module for Windows PowerShell to set a user’s profile attributes.
Example
The following example demonstrates how to set the profile attributes of the user SaraDavis:
Set-ADUser SaraDavis -ProfilePath '\\fabrikam-srv1\profiles\%username%' -ScriptPath 'logon.vbs' -HomeDrive 'Z' -HomeDirectory '\\fabrikam-srv1\saradavis'
Set-ADUser SaraDavis -ProfilePath '\\fabrikam-srv1\profiles\%username%' -ScriptPath 'logon.vbs' -HomeDrive 'Z' -HomeDirectory '\\fabrikam-srv1\saradavis'
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
No comments:
Post a Comment