I’m writing simple PowerShell script to count number of sensitives used in each Project Group. To achieve this I use Octopus.Client.dll. Our projects use also Google Account variable type. When I execute statement:
Thanks for reaching out and for all of the information. It looks like this might just be something that got missed along the way when Google accounts were added. I can reach out and see if we can get that added but that might not be as quick as you need.
You could alternatively do the same with the API. You would need to iterate to each project group, then each project within the group, then look at the variables and check the type and tally it up.
It looks like this script might be a good starting point to modify and use. If not that one, something in the repo itself might be a better starter point for you. Here is one for listing projects in project groups that you could modify as well.
Depending on your use-case, you would need to also account for variable sets attached to the projects as well (which I’m not entirely sure the Octopus.Client method would have done that either). There is a script that will find which projects use a variable set, which you can probably use in conjunction with some other logic if you want to go down that road.
Please let me know if that helps or if you have any questions.