Running Scripts Against a Policy Folder

How can you run a script against all of the assets that are inside of a policy folder? I can’t find an easy way to do it.

Create a policy with the script scheduled and assign it to the policy folder, or create a subfolder under it if it already has a policy and assign it there. Second option is to create a saved asset search with the policy folder name and then select, Manage > Run Script

We added this recently, actually. If you go into the assets list page and go to Actions > Run Script you get a lot of ways to group assets to run against. One of those options is Customer, and then Policy Folder. You can even determine whether or not it will run against the target folder, or the target folder and all nested folders.

3 Likes

@Andy Didn’t see an announcement on that one, you snuck it past me. That should help solve what I’m trying to accomplish. I’m also going back and renaming some folders with short codes to be able to leverage asset searches more.

Yeah definitely possible now. I always avoided short codes because my memory sucks so bad so I always had to spell things out implicitly :). In any event, let me know if this gets you moving forward again once you’ve started to reconfigure things.

Is this a slow roll out? I am not seeing this functionality on our side

No, it’s been in there since PI released. Asset Tab > Actions > Run Script > Asset Filter Type: Policy Folder