- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2021 11:30 AM
My company is in the process of migrating probes to patterns, and I'm currently working on the SQL Server Instance class pattern "MSSql DB On Windows".
Our probe discovery had a customized powershell script that retrieved SQL Server Always On/Availability Group information. I'm trying to run this custom script in a pattern step using the KB article How to run powershell script in patterns, but not having luck. I've tried using the "Set Parameter Value" step with an EVAL() statement in the value, as well as the "Parse Command Output" step. Neither is producing results for me. Error info provided below.
The powershell script i need to run is a lot more complex than the examples provided by the KB article, but I have to believe there's a way to accomplish what I need.
Can someone please help?
I've attached the PS script that I'd like to run. Here's the error info that I get when I try to test using the "Parse Command Output" command
Groovy code failure: startup failed: Pattern: null, Step: Untitled Step, Hash: 52905630: 8: unexpected token: $myInstanceName @ line 8, column 50. ryAvailabilityGroup ([string] $myInstanc ^ 1 error
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2021 05:56 AM
as
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2022 06:32 AM
Hello guys,
I am having similar requirement where powershell scripts is required to get some data....I followed what
Any advise would be appreciated.
Regards,
Rinku
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2022 07:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 06:58 AM
thanks
@andym
How did you format your ps script in set command details, I tried comparing other patterns but it didn't work.