Closed olegasdo closed 4 years ago
Sorry, never mind. was late did not thought that one should pass another hashtable, not string :)
@olegasdo - if you let me know the command you were able to use, I will add it to the examples & project documentation.
Hello Used like this.
[Hashtable]$connectionParams = @{ "AllowMappingLocalDrives" = @{"value"="No";"ShouldSave"=$false} "PSMRemoteMachine" = @{"value"="ServerName";"ShouldSave"=$false} }
Get-PASPSMConnectionParameter -AccountID $account.id -ConnectionParams $connectionParams -ConnectionComponent PSM-RDP -reason "Fix XYZ" -Path .
All possible values from documentation: "ConnectionParams":{ "AllowMappingLocalDrives":{"value":"No","ShouldSave":false}, "AllowConnectToConsole":{"value":"No","ShouldSave":false}, "RedirectSmartCards":{"value":"no","ShouldSave":false}, "PSMRemoteMachine":{"value":"myremotemachine","ShouldSave":false}, "LogonDomain":{"value":"1.1.1.1","ShouldSave":false}, "AllowSelectHTML5":{"value":"No","ShouldSave":false} }
Note the new name & updated parameters for this function introduced in psPAS 4.2
New-PASPSMSession -AccountID <String> [-reason <String>] [-TicketingSystemName <String>] [-TicketId <String>]
-ConnectionComponent <String> [-AllowMappingLocalDrives<String>] [-AllowConnectToConsole <String>]
[-RedirectSmartCards <String>] [-PSMRemoteMachine <String>] [-LogonDomain <String>]
[-AllowSelectHTML5 <String>] [-ConnectionMethod <String>] [-Path <String>] [<CommonParameters>]
Instead of using a hashtable with the ConnectionParams
parameter, now the individual connection parameters can be assigned values.
Hello What am I doing wrong when trying to set connection parameters? according documentation it should be "AllowMappingLocalDrives":{"value":"No","ShouldSave":false}, I've tried "No", 0, $false in the follwing table $connectionParams = @{ "AllowMappingLocalDrives" = "No" } And when trying to execute Get-PASPSMConnectionParameter -AccountID $account.id -ConnectionParams $connectionParams -ConnectionComponent PSM-RDP-1440-900 -reason "Fix XYZ"
I'm geting Invoke-PASRestMethod : [400] There are some invalid parameters: Input parameter for [ConnectionParams.AllowMappingLocalDrives] value is invalid
Tried searching for a syntax, but did not managed to find examples.