Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to set adaccountcontrol in powershell powershell?


Asked by Lane Reese on Dec 09, 2021 FAQ



Set-ADAccountControl modifies the user account control (UAC) values for an AD user or computer account. The -Identityparameter specifies the AD account to modify. Identify an account by its distinguished name (DN), GUID, security identifier (SID) or security accounts manager (SAM) account name.
Furthermore,
The Set-ADAccountControl cmdlet modifies the user account control (UAC) values for an Active Directory user or computer account. UAC values are represented by cmdlet parameters. For example, set the PasswordExpired parameter to change whether an account is expired and to modify the ADS_UF_PASSWORD_EXPIRED UAC value.
In fact, We can set Active Directory user property values using Powershell cmdlet Set-ADUser. The Set-ADUser cmdlet modifies the properties of an Active Directory user.
Accordingly,
Identify an account by its distinguished name (DN), GUID, security identifier (SID) or security accounts manager (SAM) account name. Alternatively set the -Identityparameter to a user object variable, or pass a user object through the PowerShell pipeline.
Also Know,
The default is the current user unless the cmdlet is run from an AD PowerShell provider drive in which case the account associated with the drive is the default. "User64" or "Domain01\User64" or a PSCredentialobject.