SharePoint PowerShell Handy ADFS scripts

Adding a PowerShell sanp-in
you need to use this once at each PowerShell editor session.

Add-PSSnapin Microsoft.SharePoint.PowerShell

 

Get ADFS settings
The following commands will present the current security provider settings, you can use the following to snapshot the status before and after changes you plan to make on the security provider( your ADFS farm).

#Add-PSSnapin Microsoft.SharePoint.PowerShell
clear
Write-Host “——– get-SPTrustedIdentityTokenIssuer————————————”
Write-Host ” List of trusted identity providers”
Write-Host
get-SPTrustedIdentityTokenIssuer

Write-Host “———get-SPTrustedRootAuthority——————————————”
Write-Host
get-SPTrustedRootAuthority

Write-Host “———get-SPSecurityTokenServiceConfig————————————”
Write-Host “You can use this object to set the login token expiration time—————-”
Write-Host
Get-SPSecurityTokenServiceConfig

Write-Host “————————Get-SPClaimProvider ————————————”
Write-Host “—————————–”
Write-Host
Get-SPClaimProvider

Write-Host “————get-SPClaimTypeEncoding————————————”
Write-Host “returns a list of all types of claima in the farm”
Write-Host
Get-SPClaimTypeEncoding

Write-Host “———–Get current trusted identity claims —————————-”
Write-Host “returns the list of the current ADFS claim types”
Write-Host
(Get-SPTrustedIdentityTokenIssuer -Identity “AD FS 2.0 – SSO”).ClaimTypes

Leave a Reply

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