Hi
Can anybody help me with adding a Documentation (plain text) to a session?
Thanks in advance
Hello,
If you want to add a text document as an attachment to an existing session, then please use Add-RDMSessionAttachment cmdlet.
Here is a sample script about it.
$session = Get-RDMSession -Name TestRDPFile Add-RDMSessionAttachment -Filename "C:\Temp\aws.pem" -Session $session Set-RDMSession $session -Refresh
Let us know if that helps.
Best regards,
Érica Poirier
But the text document is not stored anywhere, it should be stored in RDM. That's why we are trying to use the documentation tab:
So unfortunately this solution is not an option for us...
ec8499ef-24fe-444d-8145-81e04e3c9a78.png
Hello,
Thank you for your feedback.
For the Documentation tab of an existing entry, we must first create a PSHandbook Page object and then a Handbook object.
Here is a sample script you can use.
$handbookpage = New-Object Devolutions.RemoteDesktopManager.Business.ConnectionHandbookPage $handbookpage.Data = "**Markdown text here**" $handbookpage.Name = "NewPage" $handbook = New-Object RemoteDesktopManager.PowerShellModule.PSOutputObject.PSHandbook $handbookpage Set-RDMSessionDocumentation -ID $session.ID -Handbook $handbook -Refresh
Let us know if that helps.
Best regards,
Érica Poirier
This helps alot, tnx!
Hello,
Thank you for your feedback and glad it helped!
Best regards,
Érica Poirier
Erica, can I follow on this thread and ask about how to retrieve this data? Here is an example:
***
Get-RDMSessionDocumentation -Session $RDMSession
Pages
-----
{Notes}
***
The Notes tab in Documentation has data in it but I can't figure out how to structure the command so as to retrieve it. I tried a few variations including:
Get-RDMSessionDocumentation -Session $RDMSession -Page Notes
Get-RDMSessionDocumentation -Session $RDMSession -Page "Notes"
Get-RDMSessionDocumentation -Session $RDMSession -Page "{Notes}"
With no success. Could you point me in the right direction?
Thanks.
Hi,
You're heading in the right direction.
Assuming the documentation page is called 'Notes', the data shown in RDM can be retrieved this way
$doc = Get-RDMSessionDocumentation -Session $RDMSession -Page 'Notes' $doc.Pages.Data
If you fetch more than one documentation page, $doc.Pages will be an array.
Let me hnow if this helps.
Regards
Jonathan Lafontaine
That was the trick. Many thanks Jonathan.
Thank you for your feedback and glad it helped!
Jonathan Lafontaine