Reputation: 791
I am trying to do a simple task of creating a folder in an azure web app and add a file in it. Here is what I've achieved so far and need some help with the right commands
Add-AzureAccount
Select-AzureRmSubscription -SubscriptionName 'Demo'
$webApp = Get-AzureRmWebApp -Name 'test--app' -ResourceGroupName 'TEST-POC-AUTOMATION'
$webApp.<CANT FIGURE OUT WHICH COMMAND>
$root = 'D:\home\site\wwwroot\webapps\ROOT'
if (!(Test-Path $root))
{
md $root
}
I am trying to wonder if this is possible or i've to use KUDU API to achieve this. Appreciate any inputs.
Upvotes: 0
Views: 2563
Reputation: 19205
You could use Kudu API to do this, check this link.
PUT /api/vfs/{path}/
Creates a directory at path. The path can be nested, e.g. `folder1/folder2`.
If you want to use Power Shell to call the API, you could check this example.
Upvotes: 3