Invoke-VPASActivePSMSessionAction


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

***FUNCTIONALITY OF THIS FUNCTION IS NOT VALIDATED AT THE MOMENT***


Description:

USE THIS FUNCTION TO ACTION ON AN ACTIVE PSM SESSION SUSPEND/RESUME/TERMINATE


Syntax:

Invoke-VPASActivePSMSessionAction -SearchQuery <String> -Action <String> [-token <Hashtable>] [<CommonParameters>]

Invoke-VPASActivePSMSessionAction -ActiveSessionID <String> -Action <String> [-token <Hashtable>] [<CommonParameters>]

Invoke-VPASActivePSMSessionAction -InputParameters <Hashtable> [-token <Hashtable>] [<CommonParameters>]


Parameters:

-SearchQuery <String>
Search string to find target resource via username, address, safe, platform, etc.
Comma separated for multiple fields, or to search all pass a blank value like so: " "

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-ActiveSessionID <String>
Unique ID for the target ActiveSessionID
Provide this value to skip querying all ActiveSessions

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-Action <String>
Specify what action should be taken
Possible values: Suspend, Resume, Terminate

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-InputParameters <Hashtable>
HashTable of values containing the parameters required to make the API call

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-token <Hashtable>
HashTable of data containing various pieces of login information (PVWA, LoginToken, HeaderType, etc).
If -token is not passed, function will use last known hashtable generated by New-VPASToken

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug
ErrorAction, ErrorVariable, WarningAction, WarningVariable
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216)


Examples:

$ActionActiveSessionStatus = Invoke-VPASActivePSMSessionAction -SearchQuery {SEARCHQUERY VALUE} -Action {RESUME/SUSPEND/TERMINATE}

$ActionActiveSessionStatus = Invoke-VPASActivePSMSessionAction -ActiveSessionID {ACTIVE SESSION ID VALUE} -Action {RESUME/SUSPEND/TERMINATE}

$InputParameters = @{
        SearchQuery = "DomainAdmin01"
        Action = "Suspend"|"Resume"|"Terminate"
}
$ActionActiveSessionStatus = Invoke-VPASActivePSMSessionAction -InputParameters $InputParameters

$InputParameters = @{
        ActiveSessionID = "31_24"
         Action = "Suspend"|"Resume"|"Terminate"
}
$ActionActiveSessionStatus = Invoke-VPASActivePSMSessionAction -InputParameters $InputParameters


Outputs:

$true if successful

$false if failed