New-AdfsAccessControlPolicy

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

Get-Command New-AdfsAccessControlPolicy powershell script command cmdlet adfs

You can also read about

  • Get-AdfsAccessControlPolicy
  • Remove-AdfsAccessControlPolicy
  • Set-AdfsAccessControlPolicy

To know more PowerShell cmdlets(Commands) on Active Directory Federation Services(ADFS) click here

Click on this Link for an Single place where you get all the PowerShell cmdlet sorted based on the modules.

You can also refer other blogs on PowerShell at link

You can also refer other blogs on Microsoft at link

And also if you required any technology you want to learn, let us know below we will publish them in our site http://tossolution.com/

Like our page in Facebook and follow us for New technical information.

References are taken from Microsoft

Leave a Reply

Your email address will not be published. Required fields are marked *