Forum Discussion
I also would like to know if there is an equivalent option for Powershell.
But I have a feeling there isn't. I think groovy has the option because the collector itself is written in Java and can likely share objects between them. I think with PowerShell they are just opening powershell sessions and sending commands to it via input buffer/pipe (SSE). I think that is why they use a kinda hacky method to pass tokens via find-and-replace of ##token## text instead of passing objects.
As a work around, when I create BatchScripts I would have the same code that is in the Active Discovery section in the Collection section and just redetect the instances. Many times the code for both sections are the same and I just have a IsAD=true/false at the start with an IF statement to control what output it provides. Actually some of LM's own DataSources work this way (where I got the idea) which also leads me to believe an equivalent option is not available.