0

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.

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.