A basic approach for load testing of AD FS
By Luis Feliz
v1.1 BETA
Portions based on Josh Gavant's original work
https://blogs.msdn.microsoft.com/besidethepoint/2012/10/17/request-adfs-security-token-with-powershell/
Notes:
This testing method has not been officialy approved by Microsoft.
This will not work with Certificate auth.
This will not work with Multi-Factor authentication.
.\ADFSLoadTesting.ps1 -ADFSUrl https://sts.contoso.com
RPs
One or more Relaying part trusts identifiers to test against.
Default is urn:federation:MicrosoftOnline
HowLongInSeconds
Amount of time to test for.
Default is 30 seconds
Jobs
Number of Jobs to run when testing.
Default is 8 jobs
Note: In order to push the server the hardest, adjust the number of Jobs to run simulteniously Increase this number until the server is hitting ~ 90-99% CPU
Kerberos
Set this to $true if you wish to use Kerberos authentication.
Default is $false
When this setting is $false, the Credentials parameter will be ignored.
Credentials
One or more sets of credentials to use for authentication.
Default is to ask for Credentials.
When multiple credentials are specified, the script will choose at random for each authentication.
TLSMode
The TLS mode to use. Valid input is tls1.0, tls1.1 or tls1.2.
Default is tls1.2
Test against sts.contoso.com, for 5 minutes, using the urn:federation:MicrosoftOnline RPT
.\ADFSLoadTesting.ps1 -ADFSUrl https://sts.contoso.com -HowLongInSeconds 300
Test against sts.contoso.com, with 5 jobs, for 45 seconds, and against Trusts https://app1 and https://app2
.\ADFSLoadTesting.ps1 -ADFSUrl https://sts.contoso.com -RPs https://app1, https://app2 -Jobs 5 -HowLongInSeconds 45