Watch-VPASActivePSMSession


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

MONITOR ACTIVE SESSION


Description:

USE THIS FUNCTION TO MONITOR ACTIVE PSM SESSION


Syntax:

Watch-VPASActivePSMSession [[-SearchQuery] <String>] [[-ActiveSessionID] <String>] [[-OpenRDPFile]] [[-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 that maps to the target ActiveSession
Supply the ActiveSessionID to skip any querying to find the target ActiveSession

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

-OpenRDPFile [<SwitchParameter>]
Trigger the RDPFile to open by default, rather then just display the RDPFile contents

Required: false
Position: 3
Default value: False
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:

$MonitorActiveSessionRDPFile = Watch-VPASActivePSMSession -SearchQuery {SEARCHQUERY VALUE}

$MonitorActiveSessionRDPFile = Watch-VPASActivePSMSession -ActiveSessionID {ACTIVE SESSION ID VALUE}


Outputs:

If successful:
An RDP file containing the following example
full address:s:1.2.3.4
server port:i:3389
username:s:localhost\PSM@1df467e5-de84-424f-8527-d88a423577fc
alternate shell:s:PSM@1df467e5-de84-424f-8527-d88a423577fc
desktopwidth:i:768
desktopheight:i:1024
screen mode id:i:2
redirectdrives:i:0
drivestoredirect:s:
redirectsmartcards:i:0
EnableCredSspSupport:i:0
redirectcomports:i:0
remoteapplicationmode:i:0
use multimon:i:0
span monitors:i:0
smart sizing:i:1

$false if failed