Created
May 6, 2016 19:39
-
-
Save ATLPhenx/d305784aa2124f37d0be38fc95ffd2d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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