New-VPASPSMSession


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

CONNECT WITH PSM


Description:

USE THIS FUNCTION TO MAKE A CONNECTION VIA PSM


Syntax:

New-VPASPSMSession [[-safe] <String>] [[-platform] <String>] [[-username] <String>] [[-address] <String>] [[-OpenRDPFile]] [-ConnectionComponent] <String> [[-TargetServer] <String>] [[-Reason] <String>] [[-AcctID] <String>] [[-token] <Hashtable>] [<CommonParameters>]


Parameters:

-safe <String>
Safe name that will be used to query for the target account if no AcctID is passed

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

-platform <String>
PlatformID that will be used to query for the target account if no AcctID is passed

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

-username <String>
Username that will be used to query for the target account if no AcctID is passed

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

-address <String>
Address that will be used to query for the target account if no AcctID is passed

Required: false
Position: 4
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: 5
Default value: False
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-ConnectionComponent <String>
Define which connection component will be used via ConnectionComponentID
ConnectionComponentID is the ID given to the Connection Component (for example PSM-RDP for RDP, and PSM-SSH for SSH)

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

-TargetServer <String>
Define the target server if the connection component prompts for a server
Commonly used for domain accounts connecting via PSM-RDP

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

-Reason <String>
Define a reason for connecting for audit purposes

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

-AcctID <String>
Unique ID that maps to a single account, passing this variable will skip any query functions

Required: false
Position: 9
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: 10
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:

$ConnectWithPSMRDPFile = New-VPASPSMSession -safe {SAFE VALUE} -username {USERNAME VALUE} -address {ADDRESS VALUE}

$ConnectWithPSMRDPFile = New-VPASPSMSession -AcctID {ACCTID 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