Skip to content

Instantly share code, notes, and snippets.

@pacodelacruz
Last active August 11, 2016 11:02
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 pacodelacruz/d89cff7d94087bb5755eb1c02c7897b9 to your computer and use it in GitHub Desktop.
Save pacodelacruz/d89cff7d94087bb5755eb1c02c7897b9 to your computer and use it in GitHub Desktop.
function Get-KuduApiAuthorisationHeaderValue($resourceGroupName, $webAppName, $slotName = $null){
$publishingCredentials = Get-AzureRmWebAppPublishingCredentials $resourceGroupName $webAppName $slotName
return ("Basic {0}" -f [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $publishingCredentials.Properties.PublishingUserName, $publishingCredentials.Properties.PublishingPassword))))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment