New-AdfsAccessControlPolicy is accessible with the help of adfs module. To install adfs on your system please refer to this adfs.
Synopsis
Creates an AD FS access control policy.
Description
The New-AdfsAccessControlPolicy cmdlet creates an Active Directory Federation Services (AD FS) access control policy from a policy metadata file.
Parameters
-Description
Specifies a description.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-Identifier <String>
Specifies an ID.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-Name <String>
Specifies a name.
Required? true
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-PolicyMetadata <PolicyMetadata>
Specifies metadata for the policy.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-PolicyMetadataFile <String>
Specifies a file that contains metadata for the policy.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-SourceName <String>
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-Confirm <SwitchParameter>
Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf <SwitchParameter>
Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
Syntax
New-AdfsAccessControlPolicy -Name <String> [-SourceName <String>] [-Identifier <String>] [-Description <String>] [-PolicyMetadata <PolicyMetadata>] [-PolicyMetadataFile <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
—————Example 1—————
Create a policy template from a policy metadata file
PS C:>$t=New-AdfsAccessControlPolicy -Name “DemoOne” -PolicyMetadataFile “C:\filepath\ PolicyTemplateIntranetWithOneGroupParameterMFA.xml”
This command creates a policy template from a policy metadata file.
—————Example 2—————
Create a policy template from an existing template
PS C:>New-AdfsAccessControlPolicy -Name “DemoCopyOne” -SourceName “DemoOne”
This command creates a policy template from an existing template.
—————Example 3—————
Create a policy template from existing metadata
PS C:>New-AdfsAccessControlPolicy -Name “DemoCopyTwo” -PolicyMetadata $t.PolicyMetadata
This command creates a policy template from existing metadata. The $t variable is an object from New-AccessControlPolicy.
—————Example 4—————
Create a policy template from a relying party result policy
PS C:>New-AdfsAccessControlPolicy -Name “DemoCopyWithAssignment” -PolicyMetadata $r.ResultantPolicy
This command creates a policy template from a relying party result policy. The $r variable is the object returned from Get-AdfsRelyingPartyTrust.
You can check the Version, CommandType and Source of this cmdlet by giving below command.
Get-Command New-AdfsAccessControlPolicy
You can also read about
- Get-AdfsAccessControlPolicy
- Remove-AdfsAccessControlPolicy
- Set-AdfsAccessControlPolicy