diff --git a/Tools.ps1 b/Tools.ps1 index b14bd6f..bd8d9f9 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -269,6 +269,12 @@ Function IsWindowsBuild { # Get the path to the TEMP folder (context dependent) Function Get-TempPath { Return [System.IO.Path]::GetTempPath() } +# Get a random file name with random extension +Function Get-RandomFile { Return [System.IO.Path]::GetRandomFileName() } + +# Get a random temp file in the current TEMP folder +Function Get-RandomTempFile { Return [System.IO.Path]::Combine($(Get-TempPath), $(Get-RandomFile)) } + # Determine if the system is 64-bit or not Function Is64bit { switch ( $(Get-CimInstance -ClassName Win32_OperatingSystem -Property OSArchitecture | Select-Object -ExpandProperty OSArchitecture) )