I’m getting the below error as “Invoke Power Shell: The module ‘reg query HKLM’ could not be loaded. For more information, run ‘Import-Module reg query HKLM’.” while executing the below query in power shell activity.
I’m able to recreate the issue you are facing. It’s due to type of the command. It’s kind of script in it unlike of other commands like Get-Process etc.
Solution:
Just check the property IsScript like this and this will be resolved.
But you will have another error if you have kept property TypeArgument to default: System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Invoke Power Shell: Unable to cast object of type 'System.String' to type 'System.Collections.ObjectModel.Collection1[System.Management.Automation.PSObject]'.`