PowerShell: setting security group

PowerShell: setting security group

avatar

hi!
i'm trying to set the security group as follows but it is not reflected in the UI:

$securityGroup = Get-RDMSecurityGroup
$securityGroupGUID = [GUID]$securityGroup.ID
$sessions = Get-RDMSession
$sessionItem = $sessions[2]
Set-RDMSessionProperty -ID $sessionItem.ID -Property "SecurityGroup" -Value $securityGroupGUID

to verify i read the value using:

Get-RDMSessionProperty -ID $sessionItem.ID -Property SecurityGroup

and there the GUID is set ...

but when i right-click the entry in RDM (also after restarting RDM) the setting is not reflected.

All Comments (3)

avatar

Hello,

If you do a full refresh (CTRL-F5), is the change present in the data source?

Best regards,

Maurice

avatar

yes. now it is shown correctly (though i thought i did that before creating this post).

thanks for your help!

KR
Guenther

avatar

Add the line update-rdmui to the end of your script. That will automatically refresh the UI for you.

David F.