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>] [[-ActiveSessionID] <String>] [-Action] <String> [[-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: false
Position: 1
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: false
Position: 2
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: 3
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: 4
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}


Outputs:

$true if successful

$false if failed