Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ATLPhenx/d305784aa2124f37d0be38fc95ffd2d6 to your computer and use it in GitHub Desktop.
Save ATLPhenx/d305784aa2124f37d0be38fc95ffd2d6 to your computer and use it in GitHub Desktop.
function createRESTFileStructure($path, $directories, $Files)
{
$RestURL = "myURL"
foreach ($dir in $directories)
{
$newPath = $RestURL + $dir
$response = Invoke-RestMethod $newPath -Method POST
New-Item $newPath -type directory
}
foreach ($file in $Files)
{
$newPath = $RestURL + $file
$response = Invoke-RestMethod $newPath -Method POST
New-Item $newPath -type directory
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment