I have a zip file that contains the azure functions to be deployed to the function app that I previously deployed via a Powershell script.
I don't have any of my own Azure Subscription's. I wrote a piece of code which works fine when you are the owner of the subscription, I want the same functionality to be able to done without the owner subscription thing.
If I do Login-AzureRmAccount
, this script is not working. It's working only for Add-AzureAccount
..
Add-AzureAccount
Get-AzureSubscription -Current
$subscriptionName = Read-Host -Prompt 'Enter target Subscription name'
Select-AzureSubscription -Current -SubscriptionName $subscriptionName
$FuncAppName = Read-Host -Prompt 'Enter Function App Name you provided in above step'
Publish-AzureWebsiteProject -Package "Kovai.AtomicScope.Azure.zip" -Name $FuncAppName
I think the issue is that there is no Publish-AzureRMWebsiteProject
cmdlet (there is a Select-AzureRmSubscription
cmdlet that gets you a bit closer, but not all the way).
However, publish-AzureWebsiteProject is a wrapper over Web Deploy\MSDeploy, so you could use msdeploy directly. You can also use WAWSDeploy (also a wrapper around msdeploy), which should make things easier.