Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created September 25, 2016 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/8902f029c91ca6656b0b7e44b943ed2a to your computer and use it in GitHub Desktop.
Save nivleshc/8902f029c91ca6656b0b7e44b943ed2a to your computer and use it in GitHub Desktop.
Part of the ConfigureADFS.ps1 CSE where the credentials are obtained
#get the admin and adfs passwords first
$adminpassword = Convertto-SecureString -String (Get-Content -Path $($localpath+"adminpass.key")) -key $key
$adfspassword = Convertto-SecureString -String (Get-Content -Path $($localpath+"adfspass.key")) -key $key
$DomainAdminCreds = New-Object System.Management.Automation.PSCredential($($DomainName+"\"+$DomainAdminUsername), $adminpassword)
$AdfsSvcCreds = New-Object System.Management.Automation.PSCredential($($DomainName+"\"+$AdfsSvcUsername), $adfspassword)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment