Find all projects with a specific target role

usability
(Nikhil Agrawal) #1

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

(Dalmiro Grañas) #3

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

(Nikhil Agrawal) #4

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.

(Dalmiro Grañas) #5

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