PowerShell 6 Core Support (#35)
## About This pull request reflects all changes done in the `linuxsupport` branch. ## Content - Enable PowerShell 6 Core support - Use PFX Certificate for encryption ( fixes #32 ) - Updates CI / CD pipeline ( fixes #31 ) - uses portable libressl ( fixes #34 ) - adds `-PassThru` switch for returning current `VIServer` session in `Connect-To` ( fixes #34 ) - adds git lfs for embedded libressl files - restructured internal functions into `Private` dir - added certificate related functions - adds travis build pipeline for tests
This commit is contained in:
44
src/Private/Get-TempDir.ps1
Normal file
44
src/Private/Get-TempDir.ps1
Normal file
@ -0,0 +1,44 @@
|
||||
function Get-TempDir {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Returns the valid temp dir of the current OS
|
||||
|
||||
.DESCRIPTION
|
||||
Returns the valid temp dir of the current OS.
|
||||
|
||||
.INPUTS
|
||||
[None]
|
||||
.OUTPUTS
|
||||
[string]
|
||||
|
||||
.EXAMPLE
|
||||
Get-TempDir
|
||||
|
||||
.NOTES
|
||||
File Name : Get-TempDir.ps1
|
||||
Author : Marco Blessing - marco.blessing@googlemail.com
|
||||
Requires :
|
||||
|
||||
.LINK
|
||||
https://github.com/OCram85/PSCredentialStore
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
[OutputType([string])]
|
||||
param()
|
||||
begin {
|
||||
|
||||
}
|
||||
process {
|
||||
if ($IsLinux) {
|
||||
return (Resolve-Path -Path '/tmp/').Path
|
||||
}
|
||||
if ($IsMacOS) {
|
||||
return (Resolve-Path -Path '/tmp/').Path
|
||||
}
|
||||
elseif (($isWindows) -or ($PSVersionTable.PSVersion.Major -lt 6) -or ($PSVersionTable.PSEdition -eq 'Desktop')) {
|
||||
return (Resolve-Path -Path $env:TEMP).Path
|
||||
}
|
||||
}
|
||||
end {
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user