- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 01:06 AM - edited 02-04-2025 01:24 AM
If I create a discovery pattern step "Parse Command Value", and in "Set Command Output" run the command
powershell.exe get-mpcomputerstatus^|select-object amengineversion,amproductversion,antivirussignatureversion,AMRunningMode,AMServiceEnabled,QuickScanEndTime,DefenderSignaturesOutOfDate,AntivirusSignatureLastUpdated
I get the Output:
amengineversion : 1.1.24090.11
amproductversion : 4.18.24090.11
antivirussignatureversion : 1.421.1682.0
AMRunningMode : Normal
AMServiceEnabled : True
QuickScanEndTime : 2/4/2025 3:51:18 AM
DefenderSignaturesOutOfDate : False
AntivirusSignatureLastUpdated : 2/3/2025 10:36:45 PM
I want to put each of the values in the third column into each own variable.
I have tried some with both Regex and Delimited text, but am not able to isolate each value correctly.
e.g. if I use regex:
^(?<propName>\S+)\s*:\s*(?<propValue>.+)$
It only throws everything in my second variable:
Any tips on how to solve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 01:38 AM - edited 02-20-2025 01:40 AM
Using "Delimited text" was working fine after all.
I just had to reference the fields in the table correctly using column name and row number when setting the values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 01:38 AM - edited 02-20-2025 01:40 AM
Using "Delimited text" was working fine after all.
I just had to reference the fields in the table correctly using column name and row number when setting the values.