Find all projects with a specific target role

Hi Octopus Team,

I have projects with steps which are marked with a target role. This role is then mapped to multiple deployment targets.

I need to find out all projects which have these roles tagged as I need to remove this role.

Nikhil

1 Like

Hi @Nikhil_Agrawal,

Thanks for reaching out. The below powershell script should get you what you are after.

Remember to update the values of $role and $OctoClientDll accordingly.

Hope that helps,
Dalmiro

1 Like

Thanks @Dalmiro
This script works fine when step only has that tag. When you have multiple tags and one of them is what you want, then this script ignores that step.

I’ve updated the script to consider that scenario. Please open that link again and use the latest version :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.