Last active
July 12, 2017 02:54
-
-
Save PlagueHO/aa3604e4d820768a7ec79164187adbb2 to your computer and use it in GitHub Desktop.
Example showing how to call the Publish-AzureRMWebappProject cmdlet to publish an Azure Web App using a Service Principal in PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$SubscriptionId = '3a54931f-5351-4ec4-9cf8-518e03257eff' # Not real | |
$TenantId = 'eef4615a-8a57-4519-99ea-e2a8bad20f82' # Not real | |
$Password = 'MyP@ssword99' # Not real | |
$Username = 'a3716a34-ae63-4ab8-8fb7-1e5f15ec3975' # Not real | |
$passwordSecure = ConvertTo-SecureString -String $Password -AsPlainText -Force | |
$Credential = New-Object -TypeName PSCredential ($Username, $passwordSecure) | |
.\Publish-AzureRMWebappProject ` | |
-Credential $Credential ` | |
-SubscriptionId $SubscriptionId ` | |
-TenantId $TenantId ` | |
-WebAppPath 'C:\Users\Dan\Source\MyAwesomeWebApp\debug\netcoreapp1.1\publish' ` | |
-ResourceGroupName 'MyAwesomeWebApp' ` | |
-WebAppServiceName 'WebApp' ` | |
-SlotName 'offline' ` | |
-Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment