@@ -13,7 +13,7 @@ ms.workload: multiple
13
13
ms.tgt_pltfrm : na
14
14
ms.devlang : na
15
15
ms.topic : conceptual
16
- ms.date : 02/21 /2018
16
+ ms.date : 11/08 /2018
17
17
ms.author : tomfitz
18
18
---
19
19
@@ -100,7 +100,7 @@ The following example shows a template that creates an app service plan, a web s
100
100
101
101
To deploy this example template with PowerShell, use:
102
102
103
- ``` powershell
103
+ ``` azurepowershell-interactive
104
104
New-AzureRmResourceGroup -Name sitegroup -Location southcentralus
105
105
New-AzureRmResourceGroupDeployment -ResourceGroupName sitegroup -TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/lock.json -hostingPlanName plan0103
106
106
```
@@ -117,37 +117,37 @@ You lock deployed resources with Azure PowerShell by using the [New-AzureRmResou
117
117
118
118
To lock a resource, provide the name of the resource, its resource type, and its resource group name.
119
119
120
- ``` powershell
120
+ ``` azurepowershell-interactive
121
121
New-AzureRmResourceLock -LockLevel CanNotDelete -LockName LockSite -ResourceName examplesite -ResourceType Microsoft.Web/sites -ResourceGroupName exampleresourcegroup
122
122
```
123
123
124
124
To lock a resource group, provide the name of the resource group.
125
125
126
- ``` powershell
126
+ ``` azurepowershell-interactive
127
127
New-AzureRmResourceLock -LockName LockGroup -LockLevel CanNotDelete -ResourceGroupName exampleresourcegroup
128
128
```
129
129
130
130
To get information about a lock, use [ Get-AzureRmResourceLock] ( /powershell/module/azurerm.resources/get-azurermresourcelock ) . To get all the locks in your subscription, use:
131
131
132
- ``` powershell
132
+ ``` azurepowershell-interactive
133
133
Get-AzureRmResourceLock
134
134
```
135
135
136
136
To get all locks for a resource, use:
137
137
138
- ``` powershell
138
+ ``` azurepowershell-interactive
139
139
Get-AzureRmResourceLock -ResourceName examplesite -ResourceType Microsoft.Web/sites -ResourceGroupName exampleresourcegroup
140
140
```
141
141
142
142
To get all locks for a resource group, use:
143
143
144
- ``` powershell
144
+ ``` azurepowershell-interactive
145
145
Get-AzureRmResourceLock -ResourceGroupName exampleresourcegroup
146
146
```
147
147
148
148
To delete a lock, use:
149
149
150
- ``` powershell
150
+ ``` azurepowershell-interactive
151
151
$lockId = (Get-AzureRmResourceLock -ResourceGroupName exampleresourcegroup -ResourceName examplesite -ResourceType Microsoft.Web/sites).LockId
152
152
Remove-AzureRmResourceLock -LockId $lockId
153
153
```
0 commit comments