Need to Send Output of Command to Text File

Reply
L1 Bithead

Need to Send Output of Command to Text File

Hi there,

Can I send (print) output of a command to a csv file? (PA500, software: 8.1.4)

For example the following command lists the users of the AD and disaplys on the screen. I need a switch/parameter or perhaps another command that lets me send the output (the list of the users) to a text or a csv file. Is that possible?

 

Example of the command:

show user group name "the name of the AD group"

 

Thanks

 

 

L7 Applicator

Re: Need to Send Output of Command to Text File

@NetOverLord,

You could accomplish this with an API script, or using something like pandevice to write a python script. The firewall by itself does not have this ability built into the CLI. 

L6 Presenter

Re: Need to Send Output of Command to Text File

I just use putty for my ssh. You can send the output to a text file if you modify the settings. However if you need to do this on a regular basis the as @BPry suggested, API is your bes bet.

L7 Applicator

Re: Need to Send Output of Command to Text File

@MickBall,

Pu ... Putty ... come on now, if you aren't going to install the Windows Subsystem for Linux and install Ubuntu on your device at least do yourself the justice of installing mobaxterm. :-p

L1 Bithead

Re: Need to Send Output of Command to Text File

@MickBallThank you for your suggestion. I don't why I did not think of the sending the Putty output to text file before I posted my question. Simple enough. 

With regards to using API, I have used API for other reasons, but to interface with the FW and pull output of commands, I will have to research further.

 

 

Thank you.

 

 

Sam

L6 Presenter

Re: Need to Send Output of Command to Text File

Sure no problem.

 

If you use API all the time then great but I hardly ever use them so i sometimes go for the "output for dummies option".

 

the call you require will be similar to this "<show><user><group><name>YOUR GROUP NAME</name></group></user></show>"

 

@BPry... Duley noted but unfortunately we are provided with Dev VM's and software is only available via the corp catalogue...

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!