Skip to content

Commit 0c843fe

Browse files
authored
Merge pull request #285762 from JnHs/jh-copilot-tasks
execute tasks scenario
2 parents d2f29ef + 266ed0f commit 0c843fe

File tree

7 files changed

+59
-2
lines changed

7 files changed

+59
-2
lines changed

articles/copilot/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
items:
2121
- name: Get resource information
2222
href: get-information-resource-graph.md
23+
- name: Execute commands
24+
href: execute-commands.md
2325
- name: Deploy VMs effectively
2426
href: deploy-vms-effectively.md
2527
- name: Build infrastructure and deploy workloads

articles/copilot/execute-commands.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Execute commands using Microsoft Copilot in Azure (preview)
3+
description: Learn about scenarios where Microsoft Copilot in Azure (preview) can help you perform tasks.
4+
ms.date: 08/28/2024
5+
ms.topic: how-to
6+
ms.service: copilot-for-azure
7+
ms.author: jenhayes
8+
author: JnHs
9+
---
10+
11+
# Execute commands using Microsoft Copilot in Azure (preview)
12+
13+
Microsoft Copilot in Azure (preview) can help you execute individual or bulk commands on your resources. With Copilot in Azure, you can save time by prompting Copilot in Azure with natural language, rather than manually navigating to a resource and selecting a button in a resource's command bar.
14+
15+
For example, you can restart your virtual machines by using prompts like **"Restart my VM named ContosoDemo"** or **"Stop my VMs in West US 2."** Copilot in Azure infers relevant resources inferred through an Azure Resource Graph query and determines the relevant command. Next, it asks you to confirm the action. Commands are never executed without your explicit confirmation. After the command is executed, you can track progress in the notification pane, just as if you manually ran the command from within the Azure portal. For faster responses, specify the resource ID of the resources that you want to run the command on.
16+
17+
Copilot in Azure can execute many common commands on your behalf, as long as you have the permissions to perform them yourself. If Copilot in Azure is unable to run a command for you, it generally provides instructions to help you perform the task yourself. To learn more about the commands you can execute with natural language for a resource or service, you can ask Copilot in Azure directly. For instance, you can say **"Which commands can you help me perform on virtual machines?"**
18+
19+
[!INCLUDE [scenario-note](includes/scenario-note.md)]
20+
21+
[!INCLUDE [preview-note](includes/preview-note.md)]
22+
23+
## Sample prompts
24+
25+
Here are a few examples of the kinds of prompts you can use to execute commands. Modify these prompts based on your real-life scenarios, or try additional prompts to create different kinds of queries.
26+
27+
- "Restart my VM named ContosoDemo"
28+
- "Stop VMs in Europe regions
29+
- "Restore my deleted storage account
30+
- "Enable backup on VM named ContosoDemo"
31+
- "Restart my web app named ContosoWebApp"
32+
- "Start my AKS cluster"
33+
34+
## Examples
35+
36+
When you say **"Restore my deleted storage account**, Copilot in Azure launches the **Restored deleted account** experience. From here, you can select the subscription and the storage account that you want to recover.
37+
38+
:::image type="content" source="media/execute-commands/restore-deleted-account.png" alt-text="Screenshot of Microsoft Copilot in Azure responding to a request to restore a deleted storage account.":::
39+
40+
If you say **"Find the VMs running right now and stop them"**, Copilot in Azure first queries to find all VMs running in your selected subscriptions. It then shows you the results and asks you to confirm that the selected VMs should be stopped. You can uncheck a box to exclude a resource from the command. After you confirm, the command is run, with progress shown in your notifications.
41+
42+
:::image type="content" source="media/execute-commands/stop-running-vms.png" alt-text="Screenshot showing Copilot in Azure responding to a request to stop running VMs.":::
43+
44+
Similarly, if you say **"Delete my VMs in West US 2"**, Copilot in Azure runs a query and then asks you to confirm before running the delete command.
45+
46+
:::image type="content" source="media/execute-commands/delete-vms.png" alt-text="Screenshot of Copilot in Azure responding to a request to delete VMs.":::
47+
48+
You can also specify the resource name in your prompt. When you say things like **"Restart my VM named ContosoDemo**", Copilot in Azure looks for that resource, then prompts you to confirm the operation.
49+
50+
:::image type="content" source="media/execute-commands/restart-vm.jpg" alt-text="Screenshot of Copilot in Azure responding to a request to restart a VM.":::
51+
52+
## Next steps
53+
54+
- Explore [capabilities](capabilities.md) of Microsoft Copilot in Azure.
55+
- [Get tips for writing effective prompts](write-effective-prompts.md) to use with Microsoft Copilot in Azure.

articles/copilot/get-information-resource-graph.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Get resource information using Microsoft Copilot in Azure (preview)
2+
title: Get resource information using Microsoft Copilot in Azure (preview)
33
description: Learn about scenarios where Microsoft Copilot in Azure (preview) can help with Azure Resource Graph.
44
ms.date: 05/28/2024
55
ms.topic: how-to
@@ -42,7 +42,7 @@ Here are a few examples of the kinds of prompts you can use to generate Azure Re
4242

4343
## Examples
4444

45-
You can Ask Microsoft Copilot in Azure (preview) to write queries with prompts like "**Write a query to list my virtual machines with their public interface and public IP.**"
45+
You can ask Microsoft Copilot in Azure (preview) to write queries with prompts like "**Write a query to list my virtual machines with their public interface and public IP.**"
4646

4747
:::image type="content" source="media/get-information-resource-graph/azure-resource-graph-explorer-list-vms.png" alt-text="Screenshot of Microsoft Copilot in Azure responding to a request to list VMs.":::
4848

39.3 KB
Loading
55.2 KB
Loading
63 KB
Loading
42.5 KB
Loading

0 commit comments

Comments
 (0)