Hi there!
I’m creating a dynamic folder from AD with a powershell script. I’m wondering how to add the properties
EnableConvenienceKeyForwards
EnableWindowsKey
to the RDP Connection. Basically my Script is working perfectly - I’m just not able to “activate” those features. Can you help on that?
Basically that’s the call which creates the psobject which get’s converted in a json object afterwards.
I tried it with a nested property - but this does not work:
$null = $Servers.Add([PSCustomObject]@{
Name = $PSItem.Name
Type = 'RemoteDesktopConnection'
ComputerName = $PSItem.Name
CredentialName = 'high_secure_credential_entry'
CustomProperties = @{
EnableConvenienceKeyForwards = $true
EnableWindowsKey = $true
}
Path = $PSItem.CanonicalName.Replace("/$($PSItem.Name)",'')
})
$RoyalTSObjects = @{}
$null = $RoyalTSObjects.Add('Objects',$Servers)
$RoyalTSObjects | ConvertTo-Json -depth 3
This is an example output with my script:
{
"Objects": [
{
"Name": "SERVER_A",
"Type": "RemoteDesktopConnection",
"ComputerName": "SERVER_A",
"CredentialName": "high_secure_credential",
"CustomProperties": {
"EnableWindowsKey": true,
"EnableConvenienceKeyForwards": true
},
"Path": "contoso.com/SERVERS/"
}
]
}
Thx for your help guys!