added 2 new funcs for getting temp files
This commit is contained in:
@@ -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) )
|
||||
|
||||
Reference in New Issue
Block a user