PowerShell Logo Small

Add-ADFineGrainedPasswordPolicySubject



This is the built-in help made by Microsoft for the command 'Add-ADFineGrainedPasswordPolicySubject', 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.

SYNOPSIS

Applies a fine-grained password policy to one more users and groups.

SYNTAX


Add-ADFineGrainedPasswordPolicySubject [-Identity] <ADFineGrainedPasswordPolicy> [-Subjects] <ADPrincipal[]> [-AuthType {Negotiate | Basic}] [-Credential <PSCredential>]
[-Partition <String>] [-PassThru] [-Server <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Add-ADFineGrainedPasswordPolicySubject cmdlet applies a fine-grained password policy to one or more global security groups and users.


The Identity parameter specifies the fine-grained password policy to apply. You can identify a fine-grained password policy by its distinguished name, GUID or name. You can
also set the Identity parameter to a fine-grained password policy object variable, such as $<localPasswordPolicyObject>, or pass a fine-grained password policy object
through the pipeline operator to the Identity parameter. For example, you can use the Get-ADFineGrainedPasswordPolicy cmdlet to get a fine-grained password policy object and
then pass the object through the pipeline operator to the Add-ADFineGrainedPasswordPolicySubject cmdlet.


The Subjects parameter specifies the users and global security groups. You can identify a user or global security group by its distinguished name (DN), GUID, security
identifier (SID) or Security Accounts Manager (SAM) account name. You can also specify user and global security group object variables, such as $<localUserObject>. If you
are specifying more than one user or group, use a comma-separated list. To pass user and global security group objects through the pipeline to the Subjects parameter, use
the Get-ADUser or the Get-ADGroup cmdlets to retrieve the user or group objects, and then pass these objects through the pipeline operator to the
Add-ADFineGrainedPasswordPolicySubject cmdlet.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=291005
Get-ADFineGrainedPasswordPolicy

REMARKS

<

Examples


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

PS C:\>Add-ADFineGrainedPasswordPolicySubject -Identity DomainUsersPSO -Subjects 'Domain Users'



This command applies the Fine-Grained Password Policy named DomainUsersPSO to a Global Security Group Domain Users.




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

PS C:\>Add-ADFineGrainedPasswordPolicySubject -Identity DlgtdAdminsPSO -Subjects BobKe,KimAb



This command applies the Fine-Grained Password Policy named DlgtdAdminsPSO to two users, with SamAccountNames BobKe and KimAb.




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

PS C:\>Add-ADFineGrainedPasswordPolicySubject -Identity DlgtdAdminsPSO -Subjects DlgtdAdminGroup



This command applies the Fine-Grained Password Policy named DlgtdAdminsPSO to the group DlgtdAdminGroup.




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

PS C:\>Get-ADGroup -Filter {lastname -eq "John"} | Add-ADFineGrainedPasswordPolicySubject -Identity DlgtdAdminsPSO



This command applies the Fine-Grained Password Policy named DlgtdAdminsPSO to any users whose last names is John.