lordmilko / PrtgAPI

C#/PowerShell interface for PRTG Network Monitor
MIT License
305 stars 38 forks source link

I Would Like to execute a command reading a file, is it possible? #247

Closed marcelo-0511 closed 3 years ago

marcelo-0511 commented 3 years ago

What's going on?

I have a fortigate and i would like to read a configuration file and execute it with invoke-sshcommand, let show it for you:

I am reading the file string.txt image

And that is my script: image

When I try like this it doesn't work (I guess that is not respecting the lines in string)

When I try Like this it works:

image

The diference is one way I read a file ando another way I create the string in the code.

Please, may you help me?

I Like so much your contribution with POSH-SSH, Thanks! ;)

Due Dilligance

lordmilko commented 3 years ago

Hi @marcelo-0511,

This repo is regarding PrtgAPI, which is a PowerShell library for interfacing with PRTG Network Monitor. Can you please advise what your request has to do with PrtgAPI?

marcelo-0511 commented 3 years ago

Lordmilko, good morning

Sorry, I opened this case in the wrong Repo.

Please, forgive me.