This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
$webresp = Invoke-WebRequest "https://pvwa.example.com/PasswordVault/auth/saml/" -MaximumRedirection 0 -ErrorAction SilentlyContinue -UseBasicParsing | |
} catch { | |
$_.Exception.Response.StatusCode.Value__ | |
} | |
try { | |
$samlresp = Invoke-WebRequest -Uri ($webresp.links.href) -MaximumRedirection 1 -UseDefaultCredentials -UseBasicParsing | |
} catch { | |
$_.Exception.Response.StatusCode.Value__ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-AWSTempCred { | |
[CmdletBinding()] | |
param ( | |
[string]$ADFSHost='adfs.domain.com', ##Change for environment-appropriate default if desired | |
[string]$RelyingParty = 'urn:amazon:webservices', | |
[pscredential]$Credential | |
) | |
$WebRequestParams=@{ #Initialize parameters object | |
Uri = "https://$ADFSHost/adfs/ls/IdpInitiatedSignon.aspx?LoginToRP=$RelyingParty" |