Automating Microsoft SQL Server tasks
You can automate a workload by entering Windows PowerShell cmdlets or commands in the integrated command-line interface.
About this
task
An integrated command line is available in the task window from which you can enter
PowerShell cmdlets or command-line interface commands. You use the Automate view to work with
commands. You can create, save, store, and schedule commands to run at the scheduled time.
Procedure
What to do next
You can automate commands from the
Protect, Recover, Schedule, and Task List views in Microsoft Management Console (MMC):
- Start MMC and select a workload in the navigation tree.
- Click the tab for the task you want to do (Protect or Recover).
- Automate the command by using one of the following methods:
- Result pane
- Select the item for your task in the result pane, and select Run Scheduled in the toolbar menu. In the Actions pane, click the appropriate task. When the schedule wizard starts, enter the information for each prompt to create a scheduled task.
- Task List pane
- When a task is submitted, it displays in the task list pane. Select the
appropriate task, then click Schedule command script in the task list toolbar. When the schedule
wizard starts, enter the information for each prompt to create a scheduled task.
You can also right-click a task in the Task List pane and click Copy. Then, click the Automate tab and paste the command in the field.