I am trying to publish a Web App package on an App Service on Azure. I need to crate a Powershell script to run from the Cloud Shell, in order to publish the package. I wrote the following code
Import-AzurePublishSettingsFile - $WebApp.PublishProfilePath
Publish-AzureWebsiteProject -Package $WebApp.ZipPath -Name $WebApp.WebAppName
This code works on my local machine, but not in the Cloud Shell where I get the following errors:
Import-AzurePublishSettingsFile : The term 'Import-AzurePublishSettingsFile'
is not recognized as the name of a cmdlet, function, script file, or
operable program.
Publish-AzureWebsiteProject : The term 'Publish-AzureWebsiteProject' is not
recognized as the name of a cmdlet, function, script file, or operable
program.
I guess these errors are caused by the fact that these cmdlets comes from the old Classic Manager, which is not available in the Cloud Shell.
Basically I need to publish a Web App package from the Cloud Shell with a script. How can I achieve that? Do I have other options?