question

Emanuele L. avatar image
Emanuele L. asked ·

Scripting alert - How to pass parameter/macros in bat file

Hello world,

I need to know how to pass the parameters/macros in bat file

Reading the documentation it seems not be explained.

https://community.dynatrace.com/community/display/...

Could anyone help me?

Regards,

Ema

alertingnam console
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Rafal B. avatar image
Rafal B. answered ·

Hi Ema,

Here you can find the description of the arguments for PowerShell

https://community.dynatrace.com/community/display/...

Rafal

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hello Rafal,

Thanks for your suggest.

For script .bat the parameter are positional.

Example:

C:\>script.bat param1 param2 param3

So I get the parameters with setting variable as "%1", "%2", "%3".

Regards.

0 Likes 0 · ·
Frans S. avatar image
Frans S. answered ·

See also comments on how to call (powershell) script, with parameters here:

https://answers.dynatrace.com/questions/191051/scr...

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.