The built-in command-line wizard helps you generate command-line syntax based on the options you select. You can save the generated command to a .bat file and use it to schedule or automate script execution tasks.
To open the command-line wizard, in the lower-left corner of the Execute Script Wizard, click Save Command Line.

The table provides options available in the command-line wizard.
Tip
To include an option, select its checkbox. To exclude an option, clear its checkbox.
| Option | Description |
|---|---|
| Connection | Specifies the connection string. To generate the connection string, click the ellipsis (…) and select an existing database connection or create a new one, then click OK. Usage: /connection:<connection_string> |
| Database | Specifies the database to execute the script against. Database‑selection commands inside the script are ignored. Fully qualified object names are not affected. Usage: /database:<database_name> |
| Password | Specifies the server password. This value overrides the password in the connection string. Usage: /password:<pw> |
| Encoding | Specifies the encoding for opening and executing the script. Click the ellipsis (…) to select an encoding from the list. Usage: /encoding:<codepage|encoding_name> |
| File | Specifies the .sql or .zip file containing the script to execute. Usage: /inputfile:<file_path> |
| Zip password | Specifies the password for the protected archive. Usage: /zippassword:<zip_password> |
| Echo OFF | Wraps all text in the .bat file within the @Echo OFF ... Echo ON block, preventing commands from being displayed in the command window. |
| Keep opened | Adds the pause command at the end of the .bat file to keep the command window open after execution. |
| PowerShell | Adds the & symbol at the beginning of the .bat file to ensure PowerShell compatibility. |
The text box displays the generated script with the specified options.

To save the settings in the .bat file, click Save.
To close the dialog, click Cancel.
To verify the settings, click Validate.
If the parameter validation succeeds, the following message appears:

If the parameter validation fails the tool displays the error, for example:
