Forum Discussion
- Mike_Moniz
Professor
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.
- WRKMC
Neophyte
I was hoping that it would be possible somehow. Thanks for the answer.
I know about the discovery part you mentioned; however, in my example, I manually added instances under DS. I planned to pick all instances at once, but I have to change my approach now.
- Joe_Williams
Professor
This would be hacky, but you could technically get the instances by calling the LM API from inside your datasource.
Related Content
- 11 months ago
- 11 months ago