Skip to content

Commit 9cb42fa

Browse files
authored
Merge branch 'main' into camillepack-pin
2 parents 2f38561 + 34f16a1 commit 9cb42fa

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

copilot/copilot-prompt-gallery-export-prompts.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ In [Copilot Prompt Gallery](https://m365.cloud.microsoft/copilot-prompts), users
2424
- The saved, liked, and shared prompts of a specific user.
2525
- The prompts shared with a specific team.
2626

27-
> [!NOTE]
28-
> The user account running the PowerShell script to export the data needs to be assigned the Global Admin role.
29-
3027
## Configure your Windows PowerShell environment
3128

29+
The user account running the PowerShell script to export the data needs to be assigned to the Global Administrator role.
30+
31+
> [!IMPORTANT]
32+
> Microsoft recommends that you use roles with the fewest permissions. Using lower permissioned accounts helps improve security for your organization. Global Administrator is a highly privileged role that should be limited to emergency scenarios when you can't use an existing role. To learn more, see [About admin roles in the Microsoft 365 admin center](/microsoft-365/admin/add-users/about-admin-roles).
33+
3234
Before you can export prompts that users saved, liked, or shared in Copilot Prompt Gallery, you need to configure your PowerShell environment by doing the following steps:
3335

3436
1. [Download the CopilotLabDSR PowerShell script](#download-the-copilotlabdsr-powershell-script)
@@ -47,12 +49,16 @@ Before you can export prompts that users saved, liked, or shared in Copilot Prom
4749
### Install the MSAL.PS module
4850

4951
1. Check if the MSAL.PS module is installed by running the following command in PowerShell:
52+
5053
```PowerShell
5154
Get-Module -ListAvailable MSAL.PS
5255
```
53-
2. If the module isn't installed, install the module by running the following command in PowerShell:
56+
57+
1. If the module isn't installed, install the module by running the following command in PowerShell:
58+
5459
```PowerShell
5560
Install-Module -Name MSAL.PS -Scope CurrentUser
61+
```
5662

5763
### Load the CopilotLabDSR module
5864

@@ -72,29 +78,29 @@ Before you can export prompts that users saved, liked, or shared in Copilot Prom
7278

7379
```PowerShell
7480
Import-module "C:\AdminScripts\CopilotLabDSR.psm1"
75-
81+
```
7682

7783
## Export the saved, liked, and shared prompts of a specific user
7884

7985
1. From Windows PowerShell, use the `Export- PromptsUserContent` cmdlet to export the saved, liked, or shared prompts of a specific user from Copilot Prompt Gallery.
8086

81-
```powershell
82-
Export-PromptsUserContent -UserAadIdOrPrincipalName <Entra ID or UPN of user> -ExportDirectory <output location> -PromptType <type of prompt>
83-
```
87+
```powershell
88+
Export-PromptsUserContent -UserAadIdOrPrincipalName <Entra ID or UPN of user> -ExportDirectory <output location> -PromptType <type of prompt>
89+
```
8490

8591
| Parameter | Description |
8692
|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
8793
| UserAadIdOrPrincipalName | Use either the Microsoft Entra ID or the User Principal Name (UPN) of the user for which you want to export content. |
8894
| ExportDirectory | Location to store your output files. The folder should already exist. If not specified, the export files are saved to the current folder. |
8995
| PromptType | Specify "saved" to export the prompts saved by the user. Specify "shared" to export the prompts for which a shareable link to the prompt was generated. Specify "liked" to export prompts liked by the user. |
9096

91-
For example, the following exports Reed Smiths's saved prompts in Copilot Prompt Gallery using his UPN and downloads the export files to the location C:\PromptsExportReedSmith.
97+
For example, the following exports Reed Smiths's saved prompts in Copilot Prompt Gallery using their UPN and downloads the export files to the location C:\PromptsExportReedSmith.
9298

9399
```powershell
94100
Export- PromptsUserContent -UserAadIdOrPrincipalName [email protected] -ExportDirectory C:\PromptsExportReedSmith -PromptType saved
95101
```
96102

97-
2. When prompted to authenticate, sign in with an account that is assigned the Global Admin role, not as the user you want to export.
103+
2. When prompted to authenticate, sign in with an account assigned to the Global Admin role, not as the user you want to export.
98104
3. After the PowerShell cmdlet runs successfully, go to your export location to view your exported files.
99105

100106
## Export prompts shared with a specific team
@@ -119,7 +125,7 @@ Export- PromptsGroupContent -M365TeamsGroupId d0efcad2-6744-0de6-0624-ea467d4293
119125
> [!TIP]
120126
> To find the ID of the team, go to **Teams** > **Manage teams** in the [Teams admin center](https://admin.teams.microsoft.com/).
121127
122-
2. When prompted to authenticate, sign in with an account that is assigned the Global Admin role.
128+
2. When prompted to authenticate, sign in with an account assigned to the Global Admin role.
123129
3. After the PowerShell cmdlet runs successfully, go to your export location to view your exported files.
124130

125131
## Properties contained in the export file and their descriptions
@@ -189,4 +195,12 @@ The file name is prefixed with "Group" and the ID of the team. The file has the
189195
| Prompt.HydratedEntities.Entity.End | End time of event entity. |
190196
| Prompt.HydratedEntities.Entity.OrganizerName | Organizer Name of event entity. |
191197
| Prompt.HydratedEntities.Entity.OrganizerAddress | Organizer Address of event entity. |
192-
| Prompt.HydratedEntities.Entity.Attendees | Attendees list of event entity. |
198+
| Prompt.HydratedEntities.Entity.Attendees | Attendees list of event entity. |
199+
200+
## Related articles
201+
202+
[Understand Prompt Gallery in Copilot](copilot-prompt-gallery.md)
203+
204+
[Manage scheduled prompts for Microsoft 365 Copilot](scheduled-prompts.md)
205+
206+
[Manage Microsoft 365 Copilot scenarios in the Microsoft 365 admin center](microsoft-365-copilot-page.md)

0 commit comments

Comments
 (0)