You can use PowerShell cmdlet New-Item to create a new directory. If you want to also test if the directory not already present before creating the directory, use PowerShell cmdlet Test-Path.
1 2 3 4 5 |
$path = "C:\temp\NewFolder" If(!(Test-Path $path)) { New-Item -ItemType Directory -Force -Path $path } |