Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setupadfs.ps1 #586

Open
wants to merge 1 commit into
base: vnext
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 27 additions & 16 deletions DatacenterIntegration/Identity/setupadfs.ps1
Original file line number Diff line number Diff line change
@@ -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 ExternalDNSZoneSpecify 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
Expand All @@ -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}
Expand Down Expand Up @@ -61,4 +72,4 @@ Set-AdfsProperties -IgnoreTokenBinding $true
Set-ADFSRelyingPartyTrust -TargetName AzureStack -TokenLifeTime 1440
}
}
}
}