|
| 1 | +# Table of Contents |
| 2 | +1. [Removal of Force parameters](#removal-of-force-parameters) |
| 3 | +2. [Change of Tag parameters](#change-of-tag-parameters) |
| 4 | +3. [Breaking changes to Storage cmdlets](#breaking-changes-to-storage-cmdlets) |
| 5 | +4. [Breaking changes to AD cmdlets](#breaking-changes-to-ad-cmdlets) |
| 6 | + |
| 7 | +## Removal of Force parameters |
| 8 | + |
| 9 | +This release, we removed all Obsolete `Force` parameters from cmdlets and the corresponding warnings that the parameter would be removed in a future release. |
| 10 | + |
| 11 | +The following cmdlets are affected by this change: |
| 12 | + |
| 13 | +**ApiManagement** |
| 14 | +- Remove-AzureRmApiManagement |
| 15 | +- Remove-AzureRmApiManagementApi |
| 16 | +- Remove-AzureRmApiManagementGroup |
| 17 | +- Remove-AzureRmApiManagementLogger |
| 18 | +- Remove-AzureRmApiManagementOpenIdConnectProvider |
| 19 | +- Remove-AzureRmApiManagementOperation |
| 20 | +- Remove-AzureRmApiManagementPolicy |
| 21 | +- Remove-AzureRmApiManagementProduct |
| 22 | +- Remove-AzureRmApiManagementProperty |
| 23 | +- Remove-AzureRmApiManagementSubscription |
| 24 | +- Remove-AzureRmApiManagementUser |
| 25 | + |
| 26 | +**Automation** |
| 27 | +- Remove-AzureRmAutomationCertificate |
| 28 | +- Remove-AzureRmAutomationCredential |
| 29 | +- Remove-AzureRmAutomationVariable |
| 30 | +- Remove-AzureRmAutomationWebhook |
| 31 | + |
| 32 | +**Batch** |
| 33 | +- Remove-AzureBatchCertificate |
| 34 | +- Remove-AzureBatchComputeNode |
| 35 | +- Remove-AzureBatchComputeNodeUser |
| 36 | + |
| 37 | +**DataFactories** |
| 38 | +- Resume-AzureRmDataFactoryPipeline |
| 39 | +- Set-AzureRmDataFactoryPipelineActivePeriod |
| 40 | +- Suspend-AzureRmDataFactoryPipeline |
| 41 | + |
| 42 | +**DataLakeStore** |
| 43 | +- Remove-AzureRmDataLakeStoreItemAclEntry |
| 44 | +- Set-AzureRmDataLakeStoreItemAcl |
| 45 | +- Set-AzureRmDataLakeStoreItemAclEntry |
| 46 | +- Set-AzureRmDataLakeStoreItemOwner |
| 47 | + |
| 48 | +**OperationalInsights** |
| 49 | +- Remove-AzureRmOperationalInsightsSavedSearch |
| 50 | + |
| 51 | +**Profile** |
| 52 | +- Remove-AzureRmEnvironment |
| 53 | + |
| 54 | +**RedisCache** |
| 55 | +- Remove-AzureRmRedisCacheDiagnostics |
| 56 | + |
| 57 | +**Resources** |
| 58 | +- Register-AzureRmProviderFeature |
| 59 | +- Register-AzureRmResourceProvider |
| 60 | +- Remove-AzureRmADServicePrincipal |
| 61 | +- Remove-AzureRmPolicyAssignment |
| 62 | +- Remove-AzureRmResourceGroupDeployment |
| 63 | +- Remove-AzureRmRoleAssignment |
| 64 | +- Stop-AzureRmResourceGroupDeployment |
| 65 | +- Unregister-AzureRmResourceProvider |
| 66 | + |
| 67 | +**Storage** |
| 68 | +- Remove-AzureStorageContainerStoredAccessPolicy |
| 69 | +- Remove-AzureStorageQueueStoredAccessPolicy |
| 70 | +- Remove-AzureStorageShareStoredAccessPolicy |
| 71 | +- Remove-AzureStorageTableStoredAccessPolicy |
| 72 | + |
| 73 | +**StreamAnalytics** |
| 74 | +- Remove-AzureRmStreamAnalyticsFunction |
| 75 | +- Remove-AzureRmStreamAnalyticsInput |
| 76 | +- Remove-AzureRmStreamAnalyticsJob |
| 77 | +- Remove-AzureRmStreamAnalyticsOutput |
| 78 | + |
| 79 | +**Tag** |
| 80 | +- Remove-AzureRmTag |
| 81 | + |
| 82 | +<br> |
| 83 | + |
| 84 | +If you have a script that uses any of the above cmdlets, the breaking change can be fixed by simply removing the `Force` parameter. |
| 85 | + |
| 86 | +```powershell |
| 87 | +# Old |
| 88 | +New-AzureRmResourceGroup -Name $resourceGroupName -Location $location -Force |
| 89 | +
|
| 90 | +# New |
| 91 | +New-AzureRmResourceGroup -Name $resourceGroupName -Location $location |
| 92 | +``` |
| 93 | + |
| 94 | +<br> |
| 95 | + |
| 96 | +## Change of Tag parameters |
| 97 | + |
| 98 | +This release, the `Tags` parameter name was changed to `Tag`, and the type was changed from `Hashtable[]` to `Hashtable`, changing the format of the key-value pairings. |
| 99 | + |
| 100 | +Previously, each entry in the `Hashtable[]` represented a single key-value pairing: |
| 101 | + |
| 102 | +```powershell |
| 103 | +$tags = @{ Name = "test1"; Value = "testval1" }, @{ Name = "test2", Value = "testval2" } |
| 104 | +$tags[0].Name # Key for the first entry, "test1" |
| 105 | +$tags[0].Value # Value for the first entry, "testval1" |
| 106 | +$tags[1].Name # Key for the second entry, "test2" |
| 107 | +$tags[1].Value # Value for the second entry, "testval2" |
| 108 | +``` |
| 109 | + |
| 110 | +Now, `Name` and `Value` are no longer necessary, allowing for key-value pairings to be created by assigning `Key = "Value"` in the `Hashtable`: |
| 111 | + |
| 112 | +```powershell |
| 113 | +$tag = @{ test1 = "testval1"; test2 = "testval2" } |
| 114 | +$tag["test1"] # Gets the value associated with the key "test1" |
| 115 | +$tag["test2"] # Gets the value associated with the key "test2" |
| 116 | +``` |
| 117 | + |
| 118 | +The following cmdlets are affected by this change: |
| 119 | + |
| 120 | +**Batch** |
| 121 | +- Get-AzureRmBatchAccount |
| 122 | +- New-AzureRmBatchAccount |
| 123 | +- Set-AzureRmBatchAccount |
| 124 | + |
| 125 | +**Compute** |
| 126 | +- New-AzureRmVM |
| 127 | +- Update-AzureRmVM |
| 128 | + |
| 129 | +**DataLakeAnalytics** |
| 130 | +- New-AzureRmDataLakeAnalyticsAccount |
| 131 | +- Set-AzureRmDataLakeAnalyticsAccount |
| 132 | + |
| 133 | +**DataLakeStore** |
| 134 | +- New-AzureRmDataLakeStoreAccount |
| 135 | +- Set-AzureRmDataLakeStoreAccount |
| 136 | + |
| 137 | +**Dns** |
| 138 | +- New-AzureRmDnsZone |
| 139 | +- Set-AzureRmDnsZone |
| 140 | + |
| 141 | +**KeyVault** |
| 142 | +- Get-AzureRmKeyVault |
| 143 | +- New-AzureRmKeyVault |
| 144 | + |
| 145 | +**Network** |
| 146 | +- New-AzureRmApplicationGateway |
| 147 | +- New-AzureRmExpressRouteCircuit |
| 148 | +- New-AzureRmLoadBalancer |
| 149 | +- New-AzureRmLocalNetworkGateway |
| 150 | +- New-AzureRmNetworkInterface |
| 151 | +- New-AzureRmNetworkSecurityGroup |
| 152 | +- New-AzureRmPublicIpAddress |
| 153 | +- New-AzureRmRouteTable |
| 154 | +- New-AzureRmVirtualNetwork |
| 155 | +- New-AzureRmVirtualNetworkGateway |
| 156 | +- New-AzureRmVirtualNetworkGatewayConnection |
| 157 | +- New-AzureRmVirtualNetworkPeering |
| 158 | + |
| 159 | +**Resources** |
| 160 | +- Find-AzureRmResource |
| 161 | +- Find-AzureRmResourceGroup |
| 162 | +- New-AzureRmResource |
| 163 | +- New-AzureRmResourceGroup |
| 164 | +- Set-AzureRmResource |
| 165 | +- Set-AzureRmResourceGroup |
| 166 | + |
| 167 | +**SQL** |
| 168 | +- New-AzureRmSqlDatabase |
| 169 | +- New-AzureRmSqlDatabaseCopy |
| 170 | +- New-AzureRmSqlDatabaseSecondary |
| 171 | +- New-AzureRmSqlElasticPool |
| 172 | +- New-AzureRmSqlServer |
| 173 | +- Set-AzureRmSqlDatabase |
| 174 | +- Set-AzureRmSqlElasticPool |
| 175 | +- Set-AzureRmSqlServer |
| 176 | + |
| 177 | +**Storage** |
| 178 | +- New-AzureRmStorageAccount |
| 179 | +- Set-AzureRmStorageAccount |
| 180 | + |
| 181 | +**TrafficManager** |
| 182 | +- New-AzureRmTrafficManagerProfile |
| 183 | + |
| 184 | +<br> |
| 185 | + |
| 186 | +If you have a script that uses any of the above cmdlets, the breaking change can be fixed by changing the `Tags` parameter to `Tag`, as well as changing the `Tag` to the new format. |
| 187 | + |
| 188 | +```powershell |
| 189 | +# Old |
| 190 | +New-AzureRmResourceGroup -Name $resourceGroupName -Location -location -Tags @{ Name = "testtag"; Value = "testval" } |
| 191 | +
|
| 192 | +# New |
| 193 | +New-AzureRmResourceGroup -Name $resourceGroupName -Location -location -Tag @{ testtag = "testval" } |
| 194 | +``` |
| 195 | + |
| 196 | +<br> |
| 197 | + |
| 198 | +## Breaking changes to Storage cmdlets |
| 199 | + |
| 200 | +The following cmdlets were affected this release: |
| 201 | + |
| 202 | +**Get-AzureRmStorageAccountKey** |
| 203 | +- The cmdlet now returns a list of keys, rather than an object with properties for each key |
| 204 | + |
| 205 | +```powershell |
| 206 | +# Old |
| 207 | +$key = (Get-AzureRmStorageAccountKey -ResourceGroupName $resourceGroupName -Name $accountName).Key1 |
| 208 | +
|
| 209 | +# New |
| 210 | +$key = (Get-AzureRmStorageAccountKey -ResourceGroupName $resourceGroupName -Name $accountName)[0].Value |
| 211 | +``` |
| 212 | + |
| 213 | +**New-AzureRmStorageAccountKey** |
| 214 | +- `StorageAccountRegenerateKeyResponse` field in output of this cmdlet is renamed to `StorageAccountListKeysResults`, which is now a list of keys rather than an object with properties for each key |
| 215 | + |
| 216 | +```powershell |
| 217 | +# Old |
| 218 | +$key = (New-AzureRmStorageAccountKey -ResourceGroupName $resourceGroupName -Name $accountName).StorageAccountKeys.Key1 |
| 219 | +
|
| 220 | +# New |
| 221 | +$key = (New-AzureRmStorageAccountKey -ResourceGroupName $resourceGroupName -Name $accountName).Keys[0].Value |
| 222 | +``` |
| 223 | + |
| 224 | +**New/Get/Set-AzureRmStorageAccount** |
| 225 | +- `AccountType` field in output of this cmdlet is renamed to `Sku.Name` |
| 226 | +- Output type for PrimaryEndpoints/Secondary endpoints blob/table/queue/file changed from `Uri` to `String` |
| 227 | + |
| 228 | +```powershell |
| 229 | +# Old |
| 230 | +$accountType = (Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName -Name $accountName).AccountType |
| 231 | +
|
| 232 | +# New |
| 233 | +$accountType = (Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName -Name $accountName).Sku.Name |
| 234 | +``` |
| 235 | + |
| 236 | +```powershell |
| 237 | +# Old |
| 238 | +$blobEndpoint = (Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName -Name $accountName).PrimaryEndpoints.Blob.ToString() |
| 239 | +$blobEndpoint = (Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName -Name $accountName).PrimaryEndpoints.Blob.AbsolutePath |
| 240 | +
|
| 241 | +# New |
| 242 | +$blobEndpoint = (Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName -Name $accountName).PrimaryEndpoints.Blob.ToString() |
| 243 | +$blobEndpoint = (Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName -Name $accountName).PrimaryEndpoints.Blob |
| 244 | +``` |
| 245 | + |
| 246 | +<br> |
| 247 | + |
| 248 | +## Breaking changes to AD cmdlets |
| 249 | + |
| 250 | +The following cmdlets were affected this release: |
| 251 | + |
| 252 | +**Get-AzureRMADServicePrincipal** |
| 253 | +- `ServicePrincipalName` field in output of this cmdlet is renamed to `ServicePrincipalNames` and is now a collection. It now displays `ApplicationId` also as one of the SPN, along with the identifierUri. |
| 254 | + |
| 255 | +```powershell |
| 256 | +# Old |
| 257 | +$servicePrincipals = Get-AzureRmADServicePrincipal -SearchString $displayName |
| 258 | +$spn = $servicePrincipals[0].ServicePrincipalName |
| 259 | +
|
| 260 | +# New |
| 261 | +$servicePrincipals = Get-AzureRmADServicePrincipal -SearchString $displayName |
| 262 | +$spn = $servicePrincipals[0].ServicePrincipalNames[0] |
| 263 | +``` |
| 264 | + |
| 265 | +**Get-AzureRmADApplication** |
| 266 | +- Parameter `ApplicationObjectId` is renamed to `ObjectId`. |
| 267 | +- In output of this cmdlet, `ApplicationObjectId` is renamed to `ObjectId`. |
| 268 | + |
| 269 | +```powershell |
| 270 | +# Old |
| 271 | +$app = Get-AzureRmADApplication -ApplicationObjectId $applicationObjectId |
| 272 | +$objectId = $app.ApplicationObjectId |
| 273 | +
|
| 274 | +# New |
| 275 | +$app = Get-AzureRmADApplication -ObjectId $objectId |
| 276 | +$objectId = $app.ObjectId |
| 277 | +``` |
| 278 | + |
| 279 | +**Remove-AzureRmADApplication** |
| 280 | +- Parameter `ApplicationObjectId` is renamed to `ObjectId`. |
| 281 | + |
| 282 | +```powershell |
| 283 | +# Old |
| 284 | +$app = Remove-AzureRmADApplication -ApplicationObjectId $applicationObjectId -Force |
| 285 | +
|
| 286 | +# New |
| 287 | +$app = Remove-AzureRmADApplication -ObjectId $objectId -Force |
| 288 | +``` |
| 289 | + |
| 290 | +**New-AzureRmADApplication** |
| 291 | +- In output of this cmdlet, `ApplicationObjectId` is renamed to `ObjectId`. |
| 292 | +- `KeyValue`, `KeyUsage`, `KeyType` parameters are removed. |
| 293 | + |
| 294 | +```powershell |
| 295 | +# Old |
| 296 | +$app = New-AzureRmADApplication -DisplayName $displayName -HomePage $homePage -IdentifierUris $identifierUris -KeyValue $kv -KeyType $kt -KeyUsage $ku |
| 297 | +$id = $app.ApplicationObjectId |
| 298 | +
|
| 299 | +# New |
| 300 | +$app = New-AzureRmADApplication -DisplayName $displayName -HomePage $homePage -IdentifierUris $identifierUris |
| 301 | +$id = $app.ObjectId |
| 302 | +New-AzureRmADAppCredential -ObjectId $id -Password $kv |
| 303 | +``` |
| 304 | + |
| 305 | +**Get-AzureRmADGroup** |
| 306 | +- `Mail` field is removed from the output. |
| 307 | + |
| 308 | +**Get-AzureRmADUser** |
| 309 | +- `Mail` field is removed from the output. |
| 310 | + |
| 311 | +**New-AzureRmADServicePrincipal** |
| 312 | +- Removed `DisableAccount` parameter. |
| 313 | + |
| 314 | +```powershell |
| 315 | +# Old |
| 316 | +$servicePrincipal = New-AzureRmADServicePrincipal -DisplayName $displayName -Password $password -DisableAccount true |
| 317 | +
|
| 318 | +# New |
| 319 | +$servicePrincipal = New-AzureRmADServicePrincipal -DisplayName $displayName -Password $password |
| 320 | +Remove-AzureRmADServicePrincipal -ObjectId $servicePrincipal.ObjectId |
| 321 | +``` |
0 commit comments