If you’ve ever tried to search for an Automate script with a specific bit of text, or you’ve wanted to use a scripting function but you have not idea how it should be implemented then this blog post is for you!

Finding a real-life example of how a script function is utilised

You can perform these searches from literally any script in Automate – just open any of them up. The search doesn’t search just inside the script you open up. Once you’ve opened up any script, go to the “Find Script” tab:

There is a dropdown on this tab that is populated with every script function. Let’s say that you want to know how the Script Run function works. You’d select it from the dropdown and hit search:

What you end up with is a list of scripts that are in your Automate that utilise that particular script function, it even lists the Line number where this is used in that particular script. You can simply double click in the pane above and it will open the script for you in a new window. It’s also a good way of finding all scripts that utilise a particular function. A good example if you’ve followed my previous blog posts, I used this heavily to identify scripts I had embedded in Execute Script > PowerShell Bypass, and I used this search to find everywhere I’d embedded a PowerShell script.

Finding a particular string of text, even searching through embedded scripts

This type of search is amazing when you are looking to find something where a particular string is used in any of your scripts. Where is this handy? Lets say you wanted to search every script that you have to find out where “Get-Service” has been used. Not only does this search look through the all scripts in your Automate themselves for strings, but it even searches inside embedded scripts that you have inside functions like Execute Script. In the same Find Script tab, change the Script Function Search dropdown to Text Search, enter your Search String and click Search.

Another example use, maybe you have renamed your company and you want to find everywhere that your company name is referenced in existing scripts!

I hope you’ve found this useful, and I hope everyone has a good festive season and a happy new year.