Functions/Authentication/Get-PASSession.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# .ExternalHelp psPAS-help.xml
function Get-PASSession {
    [CmdletBinding()]
    param( )

    BEGIN { }#begin

    PROCESS {

        [PSCustomObject]@{
            User            = Get-PASLoggedOnUser -ErrorAction Stop | Select-Object -ExpandProperty Username
            BaseURI         = $Script:BaseURI
            ExternalVersion = $Script:ExternalVersion
            WebSession      = $Script:WebSession
        } | Add-ObjectDetail -typename psPAS.CyberArk.Vault.Session

    }#process

    END { }#end

}