Kaseya Community

Removing Private Folders of Exstaff

This question is answered

Something that has always annoyed me is when somebody leaves and I have to remove their accounts their Private Folders under Agent Procedures and Info Center moves to my account and I can't delete them.

I understand the reasoning for this so what I would like to know is what is the Kaseya approved method for cleaning up these "myProcedures - [username]" and "myReports - [username]" folders?

Ideally I would like to do this without needing to dig around the Kaseya database or have to contact support every time.

Verified Answer
  • I managed to fix it myself by editing the security code and renaming the folders in the database. I would be interested to know if there is an easier way to do this.

    (Disclaimer use the following information at your own risk.)

    I found the folders are located under the "Tree.treeNode" table in the database by using the following SQL Query;

    [code]
    SELECT TOP 100 [id]
          ,[partitionID]
          ,[treePresFK]
          ,[parentId]
          ,[treeNodeTypeFK]
          ,[treeNodeObjectFK]
          ,[ref]
          ,[treeDesc]
          ,[treeFullPath]
          ,[sortOrder]
          ,[securityOverride]
      FROM [ksubscribers].[Tree].[treeNode]
      WHERE [ref] LIKE '%myProcedures%'
    [/code]

    Note that you can change the value between the two % signs for the different private folders depending on which ones you want to delete;(myReportSets, myReports, myMonitorSets)

    Locate and note down the [Id] value of the folders you want to delete, an [Id] value of a private folder that you have full access to and its [ref] value(e.g; the private folder of the account that you plan to use to delete the folders) and use the following example SQL update script;

    [code]
    UPDATE [ksubscribers].[Tree].[treeNode]
       SET [treeNodeTypeFK] = 101
          ,[ref] = 'DeletePrivFolder1'
          ,[treeFullPath] = '{insert the admin account's private folder path here}.DeletePrivFolder1'
          ,[parentId] = {insert the admin account's private folder here}
      WHERE [Id] = {insert the private folder you want to remove here}
    [code]

    Replacing the highlighted parts with the values you noted down from the queries. I have tried only changing the folder type code from 100 to 101 however it looks like the API script looks of the "myProcedures", "myReportSets", "myReports" or "myMonitorSets" string in the name of the folder during the deletion process and stopped me from deleting the folders which is why I ended up renaming them.

    Once you have done that you can use the VSA to delete the folder/s named "DeletePrivFolder1" or what ever name you gave them.

All Replies
  • I delete the user which then transfers their folders to my account.  Then I can just delete the leftovers.   Most of my users don' t have any items within but from memory I vaguely recall that has caused issues in the past.

  • Hi Alistair Curran,

    Sorry for the long wait Sad

    The problem is that I can't delete these folders because I get the error message. The private folders have no content in them that I can see and I'm using a Master account so there should be no problem.

  • I have one folder I cannot delete as well. Also from an ex-employee and I am using a Master account. Usually it's no problem to delete these at all.

  • I managed to fix it myself by editing the security code and renaming the folders in the database. I would be interested to know if there is an easier way to do this.

    (Disclaimer use the following information at your own risk.)

    I found the folders are located under the "Tree.treeNode" table in the database by using the following SQL Query;

    [code]
    SELECT TOP 100 [id]
          ,[partitionID]
          ,[treePresFK]
          ,[parentId]
          ,[treeNodeTypeFK]
          ,[treeNodeObjectFK]
          ,[ref]
          ,[treeDesc]
          ,[treeFullPath]
          ,[sortOrder]
          ,[securityOverride]
      FROM [ksubscribers].[Tree].[treeNode]
      WHERE [ref] LIKE '%myProcedures%'
    [/code]

    Note that you can change the value between the two % signs for the different private folders depending on which ones you want to delete;(myReportSets, myReports, myMonitorSets)

    Locate and note down the [Id] value of the folders you want to delete, an [Id] value of a private folder that you have full access to and its [ref] value(e.g; the private folder of the account that you plan to use to delete the folders) and use the following example SQL update script;

    [code]
    UPDATE [ksubscribers].[Tree].[treeNode]
       SET [treeNodeTypeFK] = 101
          ,[ref] = 'DeletePrivFolder1'
          ,[treeFullPath] = '{insert the admin account's private folder path here}.DeletePrivFolder1'
          ,[parentId] = {insert the admin account's private folder here}
      WHERE [Id] = {insert the private folder you want to remove here}
    [code]

    Replacing the highlighted parts with the values you noted down from the queries. I have tried only changing the folder type code from 100 to 101 however it looks like the API script looks of the "myProcedures", "myReportSets", "myReports" or "myMonitorSets" string in the name of the folder during the deletion process and stopped me from deleting the folders which is why I ended up renaming them.

    Once you have done that you can use the VSA to delete the folder/s named "DeletePrivFolder1" or what ever name you gave them.