From 9faeb91a28eb694fa71685c884b59fe155e616ee Mon Sep 17 00:00:00 2001 From: leyasa Date: Fri, 23 Oct 2020 16:23:43 -0400 Subject: [PATCH] Update setupadfs.ps1 adding usebasicparsing to invoke-webrequest call --- DatacenterIntegration/Identity/setupadfs.ps1 | 43 ++++++++++++-------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/DatacenterIntegration/Identity/setupadfs.ps1 b/DatacenterIntegration/Identity/setupadfs.ps1 index 3c3ca543..865082d8 100644 --- a/DatacenterIntegration/Identity/setupadfs.ps1 +++ b/DatacenterIntegration/Identity/setupadfs.ps1 @@ -1,17 +1,28 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# See LICENSE.txt in the project root for license information. - -<# -  -.SYNOPSIS  -  -Configures existing AD FS for Azure Stack -  -.DESCRIPTION  -  -It will create a relying Party Trust to Azure Stack's AD FS with the necessary rules. It will also turn on form based authentication and Enable as setting to support Edge -  -.PARAMETER ExternalDNSZone Specify the Extnerl Dns Zone of Azure Stack which was also provided for initial deployment .EXAMPLE  .\setupadfs.ps1 -externaldnszone local.azurestack.external #> Param( [string]$ExternalDNSZone ) +# Copyright (c) Microsoft Corporation. All rights reserved. +# See LICENSE.txt in the project root for license information. + +<# +  +.SYNOPSIS  +  +Configures existing AD FS for Azure Stack +  +.DESCRIPTION  +  +It will create a relying Party Trust to Azure Stack's AD FS with the necessary rules. It will also turn on form based authentication and Enable as setting to support Edge +  +.PARAMETER ExternalDNSZone +Specify the Extnerl Dns Zone of Azure Stack which was also provided for initial deployment + +.EXAMPLE  +.\setupadfs.ps1 -externaldnszone local.azurestack.external +#> + + + +Param( + [string]$ExternalDNSZone +) $currentPath = $PSScriptRoot #Create Endpoint @@ -30,7 +41,7 @@ $MetadataURL= "https://$VIP/FederationMetadata/2007-06/FederationMetadata.xml" #Verify Metadata URL Write-Host "Validate AD FS Metadata URL" -$Validator2=Invoke-WebRequest $MetadataURL +$Validator2=Invoke-WebRequest $MetadataURL -usebasicparsing If ($Validator2.StatusCode -ne 200){ Write-Host "Metadata URL could not be retrived Error "$Validator2.StatusCode"" Exit} @@ -61,4 +72,4 @@ Set-AdfsProperties -IgnoreTokenBinding $true Set-ADFSRelyingPartyTrust -TargetName AzureStack -TokenLifeTime 1440 } } -} \ No newline at end of file +}