Skip to main content
Question

Multi-line low-code command question

  • August 28, 2026
  • 1 reply
  • 6 views

Jeff_Kinny
Forum|alt.badge.img

I have created a low-code tools DA that is set to run a snippet of powershell. It is a multi-line powershell script that has been tested on a live server and returns the results we’re looking for, however it seems to break when I put it into the low-code snippet window.

It seems to be erroring out due to syntax of the script, I’m wondering if there is a way to enter a multi-line script into low-code tools that I am missing? (for a similar example, in curl you surround a multi-line script in 3 quotes)

Here’s an example of the beginning of the script:

low_code:
  version: 2
  steps:
    - powershell:
        command: $Domain = "#####"
$Limit  = 120
 
try {
    # Find one Domain Controller
    $DC = (Resolve-DnsName "_ldap._tcp.dc._msdcs.$Domain" -Type SRV -ErrorAction Stop |
           Select-Object -First 1 -ExpandProperty NameTarget).TrimEnd('.')
 

1 reply

Jeff_Kinny
Forum|alt.badge.img
  • Author
  • Contributor II
  • August 28, 2026

Here is the error I’m seeing:

2026-08-28 16:53:20,643 - [a:3876,d:197068,c:29912,s:None] Unable to create a Device Metric. Invalid execution for {'obj_id': 29912, 'name': 'DC_Time_offset', 'app_guid': '4BD8590F7A558EE1C86BC0AA75FEBC5F'}. Traceback (most recent call last): File "/opt/em7/envs/uenv- [removed by moderator] 539821/lib64/python3.6/site-packages/silo/low_code/framework/syntax_processing.py", line 797, in get_syntax_processing_result macro_syntax, File "/opt/em7/envs/uenv- [removed by moderator] 539821/lib64/python3.6/site-packages/silo/low_code/framework/syntax_processing.py", line 854, in get_syntax_execution_result result = action_inspection.execute_action(action_callable, action_param_dict) File "/opt/em7/envs/uenv- [removed by moderator] 539821/lib64/python3.6/site-packages/silo/low_code/framework/action_inspection.py", line 71, in execute_action return inspect_method(*func_params.substituted_values) File "/opt/em7/envs/uenv- [removed by moderator] 539821/lib64/python3.6/site-packages/silo/low_code_steps/standard/arg_parser.py", line 136, in low_code_syntax yaml_dict = yaml.safe_load(snippet_arg) File "/opt/em7/lib/python3.6/yaml/__init__.py", line 125, in safe_load return load(stream, SafeLoader) File "/opt/em7/lib/python3.6/yaml/__init__.py", line 81, in load return loader.get_single_data() File "/opt/em7/lib/python3.6/yaml/constructor.py", line 49, in get_single_data node = self.get_single_node() File "/opt/em7/lib/python3.6/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/opt/em7/lib/python3.6/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/opt/em7/lib/python3.6/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/opt/em7/lib/python3.6/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/opt/em7/lib/python3.6/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/opt/em7/lib/python3.6/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/opt/em7/lib/python3.6/yaml/composer.py", line 82, in compose_node node = self.compose_sequence_node(anchor) File "/opt/em7/lib/python3.6/yaml/composer.py", line 111, in compose_sequence_node node.value.append(self.compose_node(node, index)) File "/opt/em7/lib/python3.6/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/opt/em7/lib/python3.6/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/opt/em7/lib/python3.6/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/opt/em7/lib/python3.6/yaml/composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "/opt/em7/lib/python3.6/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/opt/em7/lib/python3.6/yaml/parser.py", line 428, in parse_block_mapping_key if self.check_token(KeyToken): File "/opt/em7/lib/python3.6/yaml/scanner.py", line 115, in check_token while self.need_more_tokens(): File "/opt/em7/lib/python3.6/yaml/scanner.py", line 152, in need_more_tokens self.stale_possible_simple_keys() File "/opt/em7/lib/python3.6/yaml/scanner.py", line 292, in stale_possible_simple_keys "could not find expected ':'", self.get_mark()) yaml.scanner.ScannerError: while scanning a simple key in "<unicode string>", line 6, column 1: $Limit = 120 ^ could not find expected ':' in "<unicode string>", line 8, column 1: try { ^