Automatically Highlight Folders with Non-Inherited Permissions

Resolved

Automatically Highlight Folders with Non-Inherited Permissions

avatar

Hi Everyone,

Is there a way to automatically assign a specific color to a folder within Devolutions Server (via RDM) if at least one permission is not set to "Inherited"?

The goal is to visually identify folders where permissions deviate from the inherited settings, making it easier to spot inconsistencies.

Thank you in advance for your help!

Rob

All Comments (3)

avatar

Hello,

I apologize for the delay in my response.

I have created a PowerShell script that might address your needs. The script will visually differentiate folders based on their permissions:

  • Folders with inherited permissions will appear in green.
  • Folders with custom-configured permissions will appear in red.


Feel free to review and modify the script to suit your specific requirements.
Please note the following prerequisites:

  • PowerShell 7 must be installed on your machine.
  • The script must be executed from a PowerShell entry within RDM.


#check if the RDM PS module is installed
if(-not (Get-Module Devolutions.PowerShell -ListAvailable)){
    Install-Module Devolutions.PowerShell -Scope CurrentUser
  }
#Change colour for each session with inherited configured
$sessions = Get-RDMSession | where {$_.ConnectionType -eq "Group"}
foreach ($session in $sessions){
If ($session.Security.RoleOverride -eq "Default" -and $session.Security.ViewOverride -eq "Default"){
  Write-host "Green" + $session.Name
  $session.ImageName = "[Green]"
  Set-RDMSession $session -Refresh
}
else{
  Write-host "Red" + $session.Name
  $session.ImageName = "[Red]"
  Set-RDMSession $session -Refresh
}
}
Update-RDMUI

Let me know if you need further clarification or assistance.
Best regards,

Jacob Lafrenière

avatar
Hello,

I apologize for the delay in my response.

I have created a PowerShell script that might address your needs. The script will visually differentiate folders based on their permissions:
  • Folders with inherited permissions will appear in green.
  • Folders with custom-configured permissions will appear in red.

Feel free to review and modify the script to suit your specific requirements.
Please note the following prerequisites:
  • PowerShell 7 must be installed on your machine.
  • The script must be executed from a PowerShell entry within RDM.

#check if the RDM PS module is installed
if(-not (Get-Module Devolutions.PowerShell -ListAvailable)){
    Install-Module Devolutions.PowerShell -Scope CurrentUser
  }
#Change colour for each session with inherited configured
$sessions = Get-RDMSession | where {$_.ConnectionType -eq "Group"}
foreach ($session in $sessions){
If ($session.Security.RoleOverride -eq "Default" -and $session.Security.ViewOverride -eq "Default"){
  Write-host "Green" + $session.Name
  $session.ImageName = "[Green]"
  Set-RDMSession $session -Refresh
}
else{
  Write-host "Red" + $session.Name
  $session.ImageName = "[Red]"
  Set-RDMSession $session -Refresh
}
}
Update-RDMUI

Let me know if you need further clarification or assistance.
Best regards,


Hi Jacob,

Thanks for your response
I will test the script and see if it works.

In the meantime, users have provided some customer folders with an image (logo of end customer). So then I should already apply the coloration one level deeper.

I will come back to it when adjustments are made.

Best Regards,

avatar

Great! Please keep me updated. Thank you!

Best regards,

Jacob Lafrenière