Forum / Remote Desktop Manager - Macro/Script/Tools

Entry to open windows explorer instance in specified location

  • Create an Issue
  • Cancel

We store documents in folders that match our group names in RDM.

I created this script to add an entry under each group that I could click to automatically open an instance of explorer in the correct folder on our network drive.

Write-Host "Creating Open Client Folder entries"
$sessions = Get-RDMSession | where {($_.ConnectionType -eq "Group") -and ($_.Name -eq $_.Group)}
foreach ($session in $sessions)
Write-Host ("Creating: " + $session.Name);
$newentry = New-RDMSession -Group $session.Name -Name 'Open Client Directory' -ConnectionType 'CommandLine'
$newentry.CommandLine = 'C:\Windows\Explorer.exe /e,/separate,\\server\sharename\$COMPANY_NAME$'
$newentry.Cmd.EmbeddedWaitTime = 0
$newentry.Cmd.UseDefaultWorkingDirectory = 'false'
$newentry.SortPriority = 1
$newentry.ImageName = 'SampleFolderBlue'
Set-RDMSession $newentry -refresh

Clock2 yrs

Hello Paul,

Thank you very much for sharing your script on our forum, much appreciated.

Best regards,

Jeff Dagenais


Clock2 yrs