I can create a new session with the following code. But then the session.id fails to let me add details to the connection?
# Create Server entry
$session = New-RDMSession -Kind RDPConfigured -Group $GroupPath -Name $FQDNHostName -Host $FQDNHostName
Set-RDMSession $session
# add Server entry property details
Write-Host "Setting connection details"
Set-RDMSessionProperty -ID $session.ID -Property "HostDomain" -Value $Domain.Name
Thanks, Stu
Hello,
The cache is used and the session isn't there yet. Sadly the only recourse at this time is to call Update-RDMUI which slows downs scripts significantly if you are doing this in a loop.
We will rewrite our snapin into a module in the future, I suspect we will not fix this issue before then.
Sorry about that,
Maurice
This is working and appears to be what I need for my current scenario:
# Create Server entry
$session = New-RDMSession -Kind RDPConfigured -Group $GroupPath -Name $FQDNHostName -Host $FQDNHostName
# add Server entry details
$session.HostDomain = $Domain.Name
$session.UserName ="is{%UserName% + '-ETG'}"
$session.KeyboardHook = "OnTheRemoteComputer"
$session.UsesHardDrives = $false
Set-RDMSession $session