Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created November 29, 2016 10:57
Show Gist options
  • Save nivleshc/8b2a00ea2fe4528122c82a9568c945e9 to your computer and use it in GitHub Desktop.
Save nivleshc/8b2a00ea2fe4528122c82a9568c945e9 to your computer and use it in GitHub Desktop.
Read in Credentials in the ConfigureWAP.ps1 script
#read in the contents of the file containing the encypted password for the account with local administrator
#access on the ADFS Server, and decrypt the password using the key
$adminpassword = Convertto-SecureString -String (Get-Content -Path $($localpath+"adminpass.key")) -key $key
#Create a PSCredential Object using the account username and password
$AdminCreds = New-Object System.Management.Automation.PSCredential($($AdminUsername), $adminpassword)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment