PowerShell Logo Small


This is the built-in help made by Microsoft for the command 'Set-ADFineGrainedPasswordPolicy', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.


Modifies an Active Directory fine-grained password policy.


Set-ADFineGrainedPasswordPolicy [-Identity] <ADFineGrainedPasswordPolicy> [-Add <Hashtable>] [-AuthType {Negotiate | Basic}] [-Clear <String[]>] [-ComplexityEnabled
<Boolean>] [-Credential <PSCredential>] [-Description <String>] [-DisplayName <String>] [-LockoutDuration <TimeSpan>] [-LockoutObservationWindow <TimeSpan>]
[-LockoutThreshold <Int32>] [-MaxPasswordAge <TimeSpan>] [-MinPasswordAge <TimeSpan>] [-MinPasswordLength <Int32>] [-PassThru] [-PasswordHistoryCount <Int32>] [-Precedence
<Int32>] [-ProtectedFromAccidentalDeletion <Boolean>] [-Remove <Hashtable>] [-Replace <Hashtable>] [-ReversibleEncryptionEnabled <Boolean>] [-Server <String>] [-Confirm]
[-WhatIf] [<CommonParameters>]
Set-ADFineGrainedPasswordPolicy [-AuthType {Negotiate | Basic}] [-Credential <PSCredential>] [-PassThru] [-Server <String>] -Instance <ADFineGrainedPasswordPolicy>
[-Confirm] [-WhatIf] [<CommonParameters>]

Search powershellhelp.space


The Set-ADFineGrainedPasswordPolicy cmdlet modifies the properties of an Active Directory fine-grained password policy. You can modify commonly used property values by using
the cmdlet parameters. Property values that are not associated with cmdlet parameters can be modified by using the Add, Replace, Clear, and Remove parameters.

The Identity parameter specifies the Active Directory fine-grained password policy to modify. You can identify a fine-grained password policy by its distinguished name (DN),
GUID or name. You can also set the Identity parameter to an object variable such as $<localFineGrainedPasswordPolicyObject>, or you can pass an object through the pipeline
to the Identity parameter. For example, you can use the Get-ADFineGrainedPasswordPolicy cmdlet to retrieve a fine-grained password policy object and then pass the object
through the pipeline operator to the Set-ADFineGrainedPasswordPolicy cmdlet.

The Instance parameter provides a way to update a fine-grained password policy object by applying the changes made to a copy of the object. When you set the Instance
parameter to a copy of an Active Directory fine-grained password policy object that has been modified, the Set-ADFineGrainedPasswordPolicy cmdlet makes the same changes to
the original fine-grained password policy object. To get a copy of the object to modify, use the Get-ADFineGrainedPasswordPolicy object. The Identity parameter is not
allowed when you use the Instance parameter. For more information about the Instance parameter, see the Instance parameter description. For more information about how the
Instance concept is used in Active Directory cmdlets, type Get-Help about_ActiveDirectory_Instance.



Online Version: http://go.microsoft.com/fwlink/p/?linkid=291118




-------------------------- EXAMPLE 1 --------------------------

PS C:\>Set-ADFineGrainedPasswordPolicy -Identity MyPolicy -Precedence 100 -LockoutDuration 00:40:00 -LockoutObservationWindow 00:20:00 -ComplexityEnabled $True
-ReversibleEncryptionEnabled $false -MinPasswordLength 12

This command updates the Precedence, LockoutDuration, LockoutObservationWindow, ComplexityEnabled, ReversibleEncryptionEnabled, and MinPasswordLength properties on the
FineGrainedPasswordPolicy object with name MyPolicy.

-------------------------- EXAMPLE 2 --------------------------

PS C:\>Set-ADFineGrainedPasswordPolicy -Identity 'CN=MyPolicy,CN=Password Settings Container,CN=System,DC=FABRIKAM,DC=COM' -MinPasswordLength 12

This command sets the MinPasswordLength property on the FineGrainedPasswordPolicy object with distinguished name CN=MyPolicy,CN=Password Settings

-------------------------- EXAMPLE 3 --------------------------

PS C:\>$fgpp = Get-ADFineGrainedPasswordPolicy -Identity MyPolicy
PS C:\> $fgpp.LockoutObservationWindow = [TimeSpan]::Parse("0.00:15:00")
PS C:\> $fgpp.LockoutThreshold = 10
PS C:\> $fgpp.MinPasswordLength = 8
PS C:\> $fgpp.PasswordHistoryCount = 24
PS C:\> Set-ADFineGrainedPasswordPolicy -Instance $fgpp

This example gets the FineGrainedPasswordPolicy object with name MyPolicy, updates a set of properties on the object, and then writes the modifications back to the directory
using the Instance parameter.

-------------------------- EXAMPLE 4 --------------------------

PS C:\>Get-ADFineGrainedPasswordPolicy -Identity "Level3Policy" | Set-ADFineGrainedPasswordPolicy -Precedence 150

This command modifies the Precedence property for the fine-grained password policy named Level3Policy. The command uses the Get-ADFineGrainedPasswordPolicy cmdlet to get the
fine-grained password policy, and then passes the policy to the current cmdlet by using the pipeline operator.