Skip to content

Instantly share code, notes, and snippets.

@AndrewPla
Last active December 29, 2019 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AndrewPla/d285812b9cd983b45a33b46dfcdfabbb to your computer and use it in GitHub Desktop.
Save AndrewPla/d285812b9cd983b45a33b46dfcdfabbb to your computer and use it in GitHub Desktop.
Cross-platform function to create temp folders. Created by Justin Grote https://twitter.com/JustinWGrote/status/1190311627746267136
function New-TempDirectory {
$pathToCreate = join-path ([io.path]::GetTempPath()) ([io.path]::GetRandomFileName())
New-Item -ItemType Directory -Path $pathToCreate
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment