Lising Session on a group

Lising Session on a group

avatar
abonnefoy
Disabled


Hello,

We have a group tree of sessions/other groups and I would like to list session without sub entries:

Example:

\
\Client

\Client\session1
\Client\session2
\Client\subgroup1
\Client\subgroup1\session3
\Client\subgroup1\session4
\Client\subgroup2\session5
If I use

Get-RDMSession -GroupName Clients

it's only returning Client object

If I use :
Get-RDMSession -GroupName Clients -IncludeSubFolders

It's returning all session, even those on sub groups

I would lile to get a list which is returniong only "sesson1, session2, subgorup1, subgroup2"

Thanks in advance for Help

Antoine

All Comments (1)

avatar

Hello,

Could you try these scripts if they solve your need?

This script returns the entries including the parent folder
$group = 'myfoldername'
Get-RDMSession | Where-Object {$_.Group -eq $group -or ($_.ConnectionType -eq 'Group' -and $_.Group -eq ($group + "\" + $_.Name))}

Or this one without the parent folder
$group = 'myfoldername'
Get-RDMSession | Where-Object {($_.ConnectionType -ne 'Group' -and $_.Group -eq $group) -or ($_.ConnectionType -eq 'Group' -and $_.Group -eq ($group + "\" + $_.Name))}
Best regards,

David Grandolfo