/user print detail
Flags: E - expired, X - disabled
0 ;;; system default user
name=“admin” group=full address=“” last-logged-in=aug/06/2023 18:44:19
1 X name=“teszt” group=read address=“”
How can I request these from the system in an rsc script and store them in 1-1 variables. If possible, so that you don’t have to write anything to a file.
The “as-value” is offered on the print command, what this does is “returns” the resulting print as an array (vs. outputting to screen/“stdout” as what happens without the “as-value”).
However, this will not have the same formatting as the screen since the “as-value” convert it to an array type & if used in email directly might be ugly since the array is converted to a string. e.g.
So if your going to concat things into an /tool email send body=… — you can directly use a :foreach to build your own output text using “find” to get all ports, net “get” on any variables you want to use in the email body: