Difference between revisions of "Powershell Util Functions"
Jump to navigation
Jump to search
(Created page with "Tempdir ``` function New-TemporaryDirectory { $parent = [System.IO.Path]::GetTempPath() [string] $name = [System.Guid]::NewGuid() # $name = [System.IO.Path]::GetRandomFi...") |
(No difference)
|
Latest revision as of 17:44, 22 May 2021
Tempdir
function New-TemporaryDirectory { $parent = [System.IO.Path]::GetTempPath() [string] $name = [System.Guid]::NewGuid() # $name = [System.IO.Path]::GetRandomFileName() New-Item -ItemType Directory -Path (Join-Path $parent $name) } $global:tmpdir = $(New-TemporaryDirectory)