19 lines
423 B
PowerShell
19 lines
423 B
PowerShell
function Test-Session {
|
|
[CmdletBinding()]
|
|
param (
|
|
|
|
)
|
|
if ($script:psipamSession) {
|
|
if ($null -eq $script:psipamSession.Expires) {
|
|
return "Valid"
|
|
} else {
|
|
if ($script:psipamSession.Expires -lt (Get-Date)) {
|
|
return "Expired"
|
|
} else {
|
|
return "Valid"
|
|
}
|
|
}
|
|
} else {
|
|
return "NoToken"
|
|
}
|
|
} |