none
How to find unused Sets RRS feed

  • Question

  • Hi,

    How can I find which SETs are not used?

    I have hundreds of sets and really need an automated way of doing this.

    Thanks.

    Regards,

    JD

    Friday, September 6, 2019 1:51 PM

All replies

  • Hi,

    Yes, it's possible. You can create an XPath query to find unused Sets. Or create a PowerShell using LithNet Powershell to find all sets and then search MPRs and other artefacts for use.

    Br

    Leo


    Did my post help? Please use "Mark as answer" or "Propose as answer". Thank you!

    Monday, September 9, 2019 6:34 AM
  • Hi
    have you ever seen the proposal of Jorge to display references to MPRs for Workflows?
    https://jorgequestforknowledge.wordpress.com/2013/10/03/showing-the-mprs-a-specific-workflowdefinition-object-is-being-used-in/

    This would also provide an idea on how to query for other objects not having a reference
    In the following examples a SET here has no reference if the result is NULL:

    1. SET used in Request MPR as Requestor SET
    /ManagementPolicyRule[(ManagementPolicyRuleType='Request' and PrincipalSet=/Set[ObjectID='%ObjectID%'])]"

    2. SET used in Request MPR as Before SET
    "/ManagementPolicyRule[(ManagementPolicyRuleType='Request' and ResourceCurrentSet=/Set[ObjectID='%ObjectID%'])]"

    3. SET used in Request MPR as After SET
    "/ManagementPolicyRule[(ManagementPolicyRuleType='Request' and ResourceFinalSet=/Set[ObjectID='%ObjectID%'])]"

    4. SET used in Transition MPR as Transition In SET
    "/ManagementPolicyRule[(ManagementPolicyRuleType='SetTransition' and ActionType='TransitionIn' and ResourceFinalSet=/Set[ObjectID='%ObjectID%'])]"

    5. SET used in Transition MPR as Transition Out SET
    "/ManagementPolicyRule[(ManagementPolicyRuleType='SetTransition' and ActionType='TransitionOut' and ResourceFinalSet=/Set[ObjectID='%ObjectID%'])]"

    Henry


    • Edited by henryschl Wednesday, September 18, 2019 11:22 AM
    • Proposed as answer by Leo Erlandsson Wednesday, September 18, 2019 12:18 PM
    Wednesday, September 18, 2019 11:21 AM