@@ -10,7 +10,7 @@ This document serves as both a breaking change notification and migration guide
10
10
- [ Breaking changes to ServiceBus cmdlets] ( #breaking-changes-to-servicebus-cmdlets )
11
11
- [ Breaking changes to Sql cmdlets] ( #breaking-changes-to-sql-cmdlets )
12
12
- [ Breaking changes to Storage cmdlets] ( #breaking-changes-to-storage-cmdlets )
13
-
13
+ - [ Breaking Changes to Profile Cmdlets ] ( #breaking-changes-to-profile-cmdlets )
14
14
## Breaking changes to Compute cmdlets
15
15
16
16
The following output types were affected this release:
@@ -314,4 +314,136 @@ $LocationMode = (Get-AzureStorageBlob -Container $containername)[0].ICloudBlob.S
314
314
$ParallelOperationThreadCount = (Get-AzureStorageContainer -Container $containername).CloudBlobContainer.ServiceClient.DefaultRequestOptions.ParallelOperationThreadCount
315
315
$PayloadFormat = (Get-AzureStorageTable -Name $tablename).CloudTable.ServiceClient.DefaultRequestOptions.PayloadFormat
316
316
$RetryPolicy = (Get-AzureStorageQueue -Name $queuename).CloudQueue.ServiceClient.DefaultRequestOptions.RetryPolicy
317
- ```
317
+ ```
318
+
319
+ ## Breaking Changes to Profile Cmdlets
320
+
321
+ The following cmdlets and cmdlet output types were changed in this release.
322
+
323
+ ### Add-AzureRmAccount breaking changes
324
+
325
+ - ``` EnvironmentName ``` parameter has been removed and replaced with ``` Environment ``` , the ``` Environment ``` now takes a string and not an ``` AzureEnvironment ``` object
326
+
327
+ ``` powershell
328
+ # Old
329
+ Add-AzureRmAccount -EnvironmentName AzureChinaCloud
330
+
331
+ # New
332
+ Add-AzureRmAccount -Environment AzureChinaCloud
333
+ ```
334
+
335
+ ### Select-AzureRmProfile was renamed to Import-AzureRmContext
336
+
337
+ ``` Select-AzureRmProfile ``` was renamed to ``` Import-AzureRmContext ```
338
+
339
+ ``` powershell
340
+ # Old
341
+ Select-AzureRmProfile -Path c:\mydir\myprofile.json
342
+
343
+ # New
344
+ Import-AzureRmContext -Path c:\mydir\myprofile.json
345
+ ```
346
+
347
+ ### Save-AzureRmProfile was renamed to Save-AzureRmContext
348
+
349
+ ``` Save-AzureRmProfile ``` was renamed to ``` Save-AzureRmContext ```
350
+
351
+ ``` powershell
352
+ # Old
353
+ Save-AzureRmProfile -Path c:\mydir\myprofile.json
354
+
355
+ # New
356
+ Save-AzureRmContext -Path c:\mydir\myprofile.json
357
+ ```
358
+ ### Breaking Changes to output PSAzureContext Type
359
+
360
+ - The ``` TokenCache ``` property changed to a type that implements ``` IAzureTokenCache ``` instead of a ``` byte[] ```
361
+
362
+ ``` powershell
363
+ # Old
364
+ $bytes = (Get-AzureRmContext).TokenCache
365
+ $bytes = (Set-AzureRmContext -SubscriptionId xxx-xxx-xxx-xxx).TokenCache
366
+ $bytes = (Add-AzureRmAccount).Context.TokenCache
367
+
368
+ # New
369
+ $bytes = (Get-AzureRmContext).TokenCache.CacheData
370
+ $bytes = (Set-AzureRmContext -SubscriptionId xxx-xxx-xxx-xxx).TokenCache.CacheData
371
+ $bytes = (Add-AzureRmAccount).Context.TokenCache.CacheData
372
+ ```
373
+
374
+ ### Breaking Changes to the output PSAzureAccount Type
375
+
376
+ - The ``` AccountType ``` property was changed to ``` Type ```
377
+
378
+ ``` powershell
379
+ # Old
380
+ $type = (Get-AzureRmContext).Account.AccountType
381
+ $type = (Set-AzureRmContext -SubscriptionId xxx-xxx-xxx-xxx).Account.AccountType
382
+ $type = (Add-AzureRmAccount).Context.Account.AccountType
383
+
384
+ # New
385
+ $type = (Get-AzureRmContext).Account.Type
386
+ $type = (Set-AzureRmContext -SubscriptionId xxx-xxx-xxx-xxx).Account.Type
387
+ $type = (Add-AzureRmAccount).Context.Account.Type
388
+ ```
389
+
390
+ ### Breaking Changes to the output PSAzureSubscription Type
391
+ - The ``` SubscriptionId ``` property was changed to ``` Id ```
392
+
393
+ ``` powershell
394
+ # Old
395
+ $id =(Get-AzureRmSubscription -SubscriptionId xxxx-xxxx-xxxx-xxxx).SubscriptionId
396
+ $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context.Subscription.SubscriptionId
397
+ $id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionId
398
+ $id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionId
399
+
400
+ # New
401
+ $id =(Get-AzureRmSubscription -SubscriptionId xxxx-xxxx-xxxx-xxxx).Id
402
+ $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context.Subscription.Id
403
+ $id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Id
404
+ $id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Id
405
+ ```
406
+
407
+ - The ``` SubscriptionName ``` property was changed to ``` Name ```
408
+
409
+ ``` powershell
410
+ # Old
411
+ $name =(Get-AzureRmSubscription -SubscriptionId xxxx-xxxx-xxxx-xxxx).SubscriptionName
412
+ $name =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context.Subscription.SubscriptionName
413
+ $name =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionName
414
+ $name =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionName
415
+
416
+ # New
417
+ $name =(Get-AzureRmSubscription -SubscriptionId xxxx-xxxx-xxxx-xxxx).Name
418
+ $name =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context.Subscription.Name
419
+ $name =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Name
420
+ $name =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Name
421
+ ```
422
+
423
+ ### Breaking Changes to the output PSAzureTenant Type
424
+
425
+ - The ``` TenantId ``` property was changed to ``` Id ```
426
+
427
+ ``` powershell
428
+ # Old
429
+ $id =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).TenantId
430
+ $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context.Tenant.TenantId
431
+ $id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.TenantId
432
+ $id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.TenantId
433
+
434
+ # New
435
+ $id =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).Id
436
+ $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context.Tenant.Id
437
+ $id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.Id
438
+ $id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.Id
439
+ ```
440
+
441
+ - The ``` Domain ``` property was changed to ``` Directory ```
442
+
443
+ ``` powershell
444
+ # Old
445
+ $tenantName =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).Domain
446
+
447
+ # New
448
+ $tenantName =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).Directory
449
+ ```
0 commit comments