Skip to content

Pass parameters to PowerShell script using real time response #481

Answered by jshcodes
hermanmaleiane asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hermanmaleiane -

This question is similar to this one, so we can borrow his example.

In this code segment, we're calling a previously uploaded CloudFile and then passing in a CommandLine for it to handle. (You can use Body Payload abstraction instead if you prefer.)

BODY = {
    "base_command": "runscript",
    "command_string": "runscript -CloudFile=\"MyScriptName\" -CommandLine=\"\"",
    "session_id": resource['session_id']
}
command_response = falcon_RTR_Session.RTR_ExecuteActiveResponderCommand(body=BODY)
print(json.dumps(command_response, indent=4)) 

As long as you know the name of the uploaded CloudFile, you should be able to do the same with RTR on single or multiple hosts.

A …

Replies: 5 comments 14 replies

Comment options

You must be logged in to vote
2 replies
@jshcodes
Comment options

@hermanmaleiane
Comment options

Answer selected by jshcodes
Comment options

You must be logged in to vote
1 reply
@jshcodes
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jshcodes
Comment options

Comment options

You must be logged in to vote
10 replies
@jshcodes
Comment options

@hermanmaleiane
Comment options

@jshcodes
Comment options

@hermanmaleiane
Comment options

@jshcodes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
RTR Real Time Response issues and questions SDK usage General SDK usage issues and questions
2 participants