Skip to content

Commit b494c98

Browse files
authored
Merge pull request #178921 from mikefrobbins/mr-azps-purview-110521
Updated PowerShell content to use Az.Purview
2 parents 2cb3a46 + e03f2fe commit b494c98

File tree

1 file changed

+62
-60
lines changed

1 file changed

+62
-60
lines changed

articles/purview/create-catalog-powershell.md

Lines changed: 62 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: 'Quickstart: Create a Purview account with PowerShell/Azure CLI'
33
description: This Quickstart describes how to create an Azure Purview account using Azure PowerShell/Azure CLI.
44
author: hophanms
55
ms.author: hophan
6-
ms.date: 09/27/2021
6+
ms.date: 10/28/2021
77
ms.topic: quickstart
88
ms.service: purview
9-
ms.custom: mode-api
9+
ms.custom: mode-api, devx-track-azurepowershell
1010
# Customer intent: As a data steward, I want create a new Azure Purview Account so that I can scan and classify my data.
1111
---
1212
# Quickstart: Create an Azure Purview account using Azure PowerShell/Azure CLI
@@ -28,103 +28,105 @@ For more information about Purview, [see our overview page](overview.md). For mo
2828
1. Sign in with your Azure credential
2929

3030
# [PowerShell](#tab/azure-powershell)
31-
31+
3232
```azurepowershell
3333
Connect-AzAccount
3434
```
35-
35+
3636
# [Azure CLI](#tab/azure-cli)
37-
37+
3838
```azurecli
3939
az login
4040
```
41-
41+
4242
---
4343
4444
1. If you have multiple Azure subscriptions, select the subscription you want to use:
4545
4646
# [PowerShell](#tab/azure-powershell)
47-
47+
4848
```azurepowershell
4949
Set-AzContext [SubscriptionID/SubscriptionName]
5050
```
51-
51+
5252
# [Azure CLI](#tab/azure-cli)
53-
53+
5454
```azurecli
5555
az account set --subscription [SubscriptionID/SubscriptionName]
5656
```
57-
57+
5858
---
5959
6060
1. Create a resource group for your Purview account. You can skip this step if you already have one:
6161
6262
# [PowerShell](#tab/azure-powershell)
63-
63+
6464
```azurepowershell
65-
New-AzResourceGroup `
66-
-Name myResourceGroup `
67-
-Location "East US"
65+
New-AzResourceGroup -Name myResourceGroup -Location 'East US'
6866
```
69-
67+
7068
# [Azure CLI](#tab/azure-cli)
71-
69+
7270
```azurecli
7371
az group create \
7472
--name myResourceGroup \
7573
--location "East US"
7674
```
77-
75+
7876
---
7977
80-
1. Create a Purview template file such as `purviewtemplate.json`. You can update `name`, `location`, and `capacity` (`4` or `16`):
78+
1. Create or Deploy the Purview account
8179
82-
```json
83-
{
84-
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
85-
"contentVersion": "1.0.0.0",
86-
"resources": [
87-
{
88-
"name": "<yourPurviewAccountName>",
89-
"type": "Microsoft.Purview/accounts",
90-
"apiVersion": "2020-12-01-preview",
91-
"location": "EastUs",
92-
"identity": {
93-
"type": "SystemAssigned"
94-
},
95-
"properties": {
96-
"networkAcls": {
97-
"defaultAction": "Allow"
98-
}
99-
},
100-
"dependsOn": [],
101-
"sku": {
102-
"name": "Standard",
103-
"capacity": "4"
104-
},
105-
"tags": {}
106-
}
107-
],
108-
"outputs": {}
109-
}
110-
```
80+
# [PowerShell](#tab/azure-powershell)
11181
112-
1. Deploy Purview template
82+
Use the [New-AzPurviewAccount](/powershell/module/az.purview/new-azpurviewaccount) cmdlet to create the Purview account:
11383
114-
# [PowerShell](#tab/azure-powershell)
115-
11684
```azurepowershell
117-
New-AzResourceGroupDeployment -ResourceGroupName "<myResourceGroup>" -TemplateFile "<PATH TO purviewtemplate.json>"
85+
New-AzPurviewAccount -Name yourPurviewAccountName -ResourceGroupName myResourceGroup -Location eastus -IdentityType SystemAssigned -SkuCapacity 4 -SkuName Standard -PublicNetworkAccess
11886
```
119-
87+
12088
# [Azure CLI](#tab/azure-cli)
121-
122-
To run this deployment command, you must have the [latest version](/cli/azure/install-azure-cli) of Azure CLI.
123-
124-
```azurecli
125-
az deployment group create --resource-group "<myResourceGroup>" --template-file "<PATH TO purviewtemplate.json>"
126-
```
127-
89+
90+
1. Create a Purview template file such as `purviewtemplate.json`. You can update `name`, `location`, and `capacity` (`4` or `16`):
91+
92+
```json
93+
{
94+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
95+
"contentVersion": "1.0.0.0",
96+
"resources": [
97+
{
98+
"name": "<yourPurviewAccountName>",
99+
"type": "Microsoft.Purview/accounts",
100+
"apiVersion": "2020-12-01-preview",
101+
"location": "EastUs",
102+
"identity": {
103+
"type": "SystemAssigned"
104+
},
105+
"properties": {
106+
"networkAcls": {
107+
"defaultAction": "Allow"
108+
}
109+
},
110+
"dependsOn": [],
111+
"sku": {
112+
"name": "Standard",
113+
"capacity": "4"
114+
},
115+
"tags": {}
116+
}
117+
],
118+
"outputs": {}
119+
}
120+
```
121+
122+
1. Deploy Purview template
123+
124+
To run this deployment command, you must have the [latest version](/cli/azure/install-azure-cli) of Azure CLI.
125+
126+
```azurecli
127+
az deployment group create --resource-group "<myResourceGroup>" --template-file "<PATH TO purviewtemplate.json>"
128+
```
129+
128130
---
129131
130132
1. The deployment command returns results. Look for `ProvisioningState` to see whether the deployment succeeded.
@@ -134,7 +136,7 @@ For more information about Purview, [see our overview page](overview.md). For mo
134136
```azurecli
135137
az purview account add-root-collection-admin --account-name --resource-group [--object-id]
136138
```
137-
139+
138140
This command will grant the user account [collection admin](catalog-permissions.md#roles) permissions on the root collection in your Azure Purview account. This allows the user to access the Purview Studio and add permission for other users. For more information about permissions in Azure Purview, see our [permissions guide](catalog-permissions.md). For more information about collections, see our [manage collections article](how-to-create-and-manage-collections.md).
139141
140142
## Next steps

0 commit comments

Comments
 (0)