AD FS Cmdlets in Windows PowerShell

Applies To: Windows Server 2012 R2 Preview

Windows PowerShell™ is a task-based command-line shell and scripting language designed especially for system administration. This reference provides command-line reference documentation for the IT professional of the Windows PowerShell cmdlets that you can use to deploy and administer Active Directory Federation Services (AD FS) in Windows Server® 2012.

AD FS  deployment cmdlets

With Windows Server 2012, the AD FS server role now includes cmdlets that you can use to perform PowerShell-based deployment within your federated identity installations and environments.

The following table lists all the cmdlets that are available for deploying AD FS in Windows Server 2012.

Cmdlet Description

Add-AdfsFarmNode

Adds this computer to an existing federation server farm.

Add-AdfsProxy

Configures this computer as a federation server proxy.

Export-AdfsDeploymentSQLScript

Generates the SQL scripts that can be used separately to create the AD FS database and to grant permissions.

Install-AdfsFarm

Creates the first node of a new federation server farm.

Install-AdfsStandalone

Sets up this computer as a stand-alone federation server for evaluation purposes or for a small lab environment.

AD FS  administration cmdlets

In addition to deployment, you can continue to use AD FS cmdlets that were first made available in AD FS 2.0 to perform various administrative, configuration, and diagnostic tasks in your federated identity deployment and environments.

Note

The following cmdlets for getting and setting AD FS configuration properties have revised from their original naming in AD FS 2.0.

  • Get-ADFSProperties has been renamed Get-AdfsConfiguration.

  • Get-ADFSProxyProperties has been renamed has been renamed Get-AdfsProxyConfiguration.

  • Get-ADFSSyncProperties has been renamed Get-AdfsSyncConfiguration.

  • Set-ADFSProperties has been renamed Set-AdfsConfiguration.

  • Set-ADFSProxyProperties has been renamed Set-AdfsProxyConfiguration.

  • Set-ADFSSyncProperties has been renamed Set-AdfsSyncConfiguration.

The following table lists all the cmdlets that are available for administering AD FS in Windows Server 2012.

Cmdlet Description

Add-ADFSAttributeStore

Adds an attribute store to the Federation Service.

Add-ADFSCertificate

Adds a new certificate to the Federation Service for signing, decrypting, or securing communications.

Add-ADFSClaimDescription

Adds a claim description to the Federation Service.

Add-ADFSClaimsProviderTrust

Adds a new claims provider trust to the Federation Service.

Add-ADFSRelyingPartyTrust

Adds a new relying party trust to the Federation Service.

Disable-ADFSClaimsProviderTrust

Disables a claims provider trust in the Federation Service.

Disable-ADFSEndpoint

Disables an endpoint of the Federation Service.

Disable-ADFSRelyingPartyTrust

Disables a relying party trust of the Federation Service.

Enable-ADFSClaimsProviderTrust

Enables a claims provider trust in the Federation Service.

Enable-ADFSEndpoint

Enables an endpoint in the Federation Service.

Enable-ADFSRelyingPartyTrust

Enables a relying party trust of the Federation Service.

Get-ADFSAttributeStore

Gets the attribute stores of the Federation Service.

Get-ADFSCertificate

Gets the certificates that are in the Federation Service.

Get-ADFSClaimDescription

Gets claim descriptions that are in the Federation Service.

Get-ADFSClaimsProviderTrust

Gets the claims provider trusts in the Federation Service.

Get-ADFSEndpoint

Gets the endpoints in the Federation Service.

Get-ADFSConfiguration

Gets the configuration properties of the Federation Service.

Get-ADFSProxyConfiguration

Gets the configuration properties of the federation server proxy.

Get-ADFSRelyingPartyTrust

Gets the relying party trusts of the Federation Service.

Get-ADFSSyncConfiguration

Gets the configuration database synchronization properties of the Federation Service.

New-ADFSClaimRuleSet

Creates a new set of claim rules.

New-ADFSContactPerson

Creates a new contact person object.

New-ADFSOrganization

Creates a new organization information object.

New-ADFSSamlEndpoint

Creates a new SAML protocol endpoint object.

Remove-ADFSAttributeStore

Removes an attribute store from the Federation Service.

Remove-ADFSCertificate

Removes a certificate from the Federation Service.

Remove-ADFSClaimDescription

Removes a claim description from the Federation Service.

Remove-ADFSClaimsProviderTrust

Removes a claims provider trust from the Federation Service.

Remove-ADFSRelyingPartyTrust

Removes a relying party trust from the Federation Service.

Revoke-ADFSProxyTrust

Revokes all proxy trust for the Federation Service.

Set-ADFSAttributeStore

Sets the properties of the attribute store.

Set-ADFSCertificate

Sets the properties of an existing certificate that the Federation Service uses to sign, decrypt, or secure communications.

Set-ADFSCertSharingContainer

Sets the account that is used for sharing managed certificates in a federation server farm.

Set-ADFSClaimDescription

Sets the properties of an existing claim description.

Set-ADFSClaimsProviderTrust

Sets the properties of a claims provider trust.

Set-ADFSEndpoint

Sets the properties of a Federation Service endpoint.

Set-ADFSConfiguration

Sets the configuration properties of the Federation Service.

Set-ADFSProxyConfiguration

Sets the configuration properties of the federation server proxy.

Set-ADFSRelyingPartyTrust

Sets the properties of a relying party trust.

Set-ADFSSyncConfiguration

Sets the properties of the database synchronization engine for the federation server farm.

Update-ADFSCertificate

Updates the certificates of the Federation Service.

Update-ADFSClaimsProviderTrust

Updates the claims provider trust from federation metadata.

Update-ADFSRelyingPartyTrust

Updates the relying party trust from federation metadata.

To use these cmdlets you must have previously installed the AD FS server role. This can be done using the Add Roles and Features Wizard in Server Manager or optionally, you can use the Install-WindowsFeature AD-Federation-Services cmdlet at a Windows PowerShell prompt to add the role.

Once the role is added, you can list all the cmdlets that are available in the AD FS module by using the Get-Command * -module ADFS cmdlet.

For more information about—or for the syntax for—any of the AD FS cmdlets, use the Get-Help <cmdlet name> cmdlet, where <cmdlet name> is the name of the cmdlet that you want to research. For more detailed information, you can run any of the following cmdlets:

  • Get-Help <cmdlet name> -Detailed

  • Get-Help <cmdlet name> -Full

  • Get-Help <cmdlet name> -Detailed

  • Get-Help <cmdlet name> -Examples

More information

For more information about the AD FS cmdlets, see the following: