Command line switches are all optional, and it doesn't matter the order you put them in. Switches are separated by a semi colon (;).
Command Line Options
- Command line switches are all optional, and it doesn't matter the order you put them in. Switches are separated by a semi colon (;).
When manually testing command-line options, you must use an Elevated Command Prompt.
Examples:
Single Schedules and Data-Driven Schedules
- To execute a Single Schedule and Data-Driven Schedules:
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" -s schedulename=myschedulename
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" !xs scheduleid
- To do the above without any messages showing:
pbrs.exe -s schedulename:myschedule;showmsg=no
- To ignore the email address in the schedule and send to a specified email address:
pbrs.exe -s schedulename:myschedule;showmsg:no;sendto:billt@mycompany.com
Packages Schedules and Data-Driven Packages
- To execute a Package:
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" -p schedulename=myschedulename
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" !xp scheduleid
- To do the above without any messages showing:
pbrs.exe -p schedulename:myschedule;showmsg=no
- To ignore the email address in the schedule and send to a specified email address:
pbrs.exe -p schedulename:myschedule;showmsg:no;sendto:billt@mycompany.com
Event-Based Schedules
- To execute an Event-Based Schedule:
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" -e schedulename=myschedulename
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" !xe scheduleid
- To do the above without any messages showing:
pbrs.exe -e schedulename:myschedule;showmsg=no
- To ignore the email address in the schedule and send to a specified email address:
pbrs.exe -e schedulename:myschedule;showmsg:no;sendto:billt@mycompany.com
Event-Based Packages:
- To execute an Event-Based Packages:
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" -ep schedulename=myschedulename
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" !xz scheduleid
- To do the above without any messages showing:
pbrs.exe -ep schedulename:myschedule;showmsg=no
- To ignore the email address in the schedule and send to a specified email address:
pbrs.exe -ep schedulename:myschedule;showmsg:no;sendto:billt@mycompany.com
Automation Schedule and Data-Driven Automation:
- To execute an Automation Schedule:
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" -a schedulename=myschedulename
"C:\Program Files (x86)\ChristianSteven\PBRS\pbrs.exe" !xa scheduleid
- To do the above without any messages showing:
pbrs.exe -a schedulename:myschedule;showmsg=no
- To ignore the email address in the schedule and send to a specified email address:
pbrs.exe -a schedulename:myschedule;showmsg:no;sendto:billt@mycompany.com
Creating a Schedule by command line:
Run pbrs.exe with the switch of -x e.g. \PBRS\pbrs.exe -x
- And then the following parameters:
ScheduleName: name of schedule
ReportPath: path of Power BI or SSRS Reports
FolderName: folder to store schedule
PBRSUser: pbrs login userid
PBRSPassword: pbrs login password
UserID: power bi report database userid
Password: power bi report database password
Frequency: schedule frequency {Daily,Weekly,Monthly,Yearly,Weekdays,Custom:[calendarname]}
RunAt: time schedule executes
Description: schedule description
Keyword: schedule keywords
StartDate: start date for schedule
EndDate: end date for schedule
Repeat: 1 or 0 if schedule is to repeat
RepeatInterval: repeat interval
RepeatUntil: repeat until time
Status: 1 or 0
UseLogin: 1or 0
UseSavedData: 1 or 0
Destination: schedule destination {Email,Disk,Fax,Printer,Ftp}
DestinationName: name of destination
SendTo: email send to or fax number
CC: email cc
Bcc: email bcc
Subject: email subject
Message: email message
Extras: extra attachments
MailFormat: text or html
SMTPServer: specify SMTP server
OutputPath: disk output path
FTPServer:FTPUserName
FTPPassword
FTPPathFormat: schedule output format
Zip: 1 or 0
Embed: 1 or 0
Parameter: [parametername]:[parametervalue]
Separate out the switches using a semi-colon(;)
e.g. pbrs.exe -x schedulename:myschedule;reportpath:c:\myreports;foldername:Bills Reports
and so on.
Csscli.exe Command-Lines
When manually testing command-line options, you must use an Elevated Command Prompt.
Csscli.exe is a command-line application to return results when running the schedules in Command Prompt.
If you want to run Command Lines to return PBRS results, use the csscli.exe command line. Using this command-line option you can view the results of the schedule right after you execute the schedule in Command Prompt. You can also view if there was an error message of the schedule if it fails.
Example:
Single Schedules and Data-Driven Schedules
- To run and view results Single Schedules and Data-Driven Schedules:
"C:\Program Files (x86)\ChristianSteven\PBRS\csscli.exe" oop s [scheduleid]
Packages Schedules and Data-Driven Packages
- To run and view results Single Packages and Data-Driven Packages:
"C:\Program Files (x86)\ChristianSteven\PBRS\csscli.exe" oop p [scheduleid]
Event-Based Schedules
- To run and view results Event-Based Schedules:
"C:\Program Files (x86)\ChristianSteven\PBRS\csscli.exe" oop e [scheduleid]
Automation Schedules and Data-Driven Automation
- To run and view results Automation Schedule and Data-Driven Automation:
"C:\Program Files (x86)\ChristianSteven\PBRS\csscli.exe" oop a [scheduleid]
How do I run Command Lines with PBRS Shortcuts?
- Go to Shortcut Properties.
- Copy Target.
- Paste the Target in Command Prompt.
Invoking PBRS From Another Server
To invoke PBRS from another server and/or run schedules with your own enterprise management or scheduling system, use
Windows:
PsExec: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
Linux:
Winexe: https://www.secpod.com/blog/winexe/
PBRS API to Execute Schedules
- You can also use the PBRS API to execute schedules - Click Here