@@ -318,17 +318,17 @@ $RetryPolicy = (Get-AzureStorageQueue -Name $queuename).CloudQueue.ServiceClient
318
318
319
319
## Breaking Changes to Profile Cmdlets
320
320
321
- The following cmdlets were changed in this release.
321
+ The following cmdlets and cmdlet output types were changed in this release.
322
322
323
323
### Add-AzureRmAccount breaking changes
324
324
325
325
- ``` EnvironmentName ``` parameter has been removed and replaced with ``` Environment ``` , the ``` Environment ``` now takes a string and not an ``` AzureEnvironment ``` object
326
326
327
327
``` powershell
328
- #Old
328
+ # Old
329
329
Add-AzureRmAccount -EnvironmentName AzureChinaCloud
330
330
331
- #New
331
+ # New
332
332
Add-AzureRmAccount -Environment AzureChinaCloud
333
333
```
334
334
@@ -337,82 +337,113 @@ Add-AzureRmAccount -Environment AzureChinaCloud
337
337
``` Select-AzureRmProfile ``` was renamed to ``` Import-AzureRmContext ```
338
338
339
339
``` powershell
340
- #Old
340
+ # Old
341
341
Select-AzureRmProfile -Path c:\mydir\myprofile.json
342
342
343
- #New
344
- Import-AzureRmContext -Path c:\mydir\mypforile .json
343
+ # New
344
+ Import-AzureRmContext -Path c:\mydir\myprofile .json
345
345
```
346
346
347
347
### Save-AzureRmProfile was renamed to Save-AzureRmContext
348
348
349
349
``` Save-AzureRmProfile ``` was renamed to ``` Save-AzureRmContext ```
350
350
351
351
``` powershell
352
- #Old
352
+ # Old
353
353
Save-AzureRmProfile -Path c:\mydir\myprofile.json
354
354
355
- #New
356
- Save-AzureRmContext -Path c:\mydir\mypforile.json
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
357
372
```
358
373
359
- ### Breaking Changes to the output Subscription type
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
360
391
- The ``` SubscriptionId ``` property was changed to ``` Id ```
361
392
362
393
``` powershell
363
- #old
394
+ # Old
364
395
$id =(Get-AzureRmSubscription -SubscriptionId xxxx-xxxx-xxxx-xxxx).SubscriptionId
365
- $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).DefaultContext .Subscription.SubscriptionId
396
+ $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context .Subscription.SubscriptionId
366
397
$id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionId
367
398
$id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionId
368
399
369
- #new
400
+ # New
370
401
$id =(Get-AzureRmSubscription -SubscriptionId xxxx-xxxx-xxxx-xxxx).Id
371
- $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).DefaultContext .Subscription.Id
402
+ $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context .Subscription.Id
372
403
$id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Id
373
404
$id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Id
374
405
```
375
406
376
407
- The ``` SubscriptionName ``` property was changed to ``` Name ```
377
408
378
409
``` powershell
379
- #old
410
+ # Old
380
411
$name =(Get-AzureRmSubscription -SubscriptionId xxxx-xxxx-xxxx-xxxx).SubscriptionName
381
- $name =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).DefaultContext .Subscription.SubscriptionName
412
+ $name =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context .Subscription.SubscriptionName
382
413
$name =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionName
383
414
$name =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionName
384
415
385
- #new
416
+ # New
386
417
$name =(Get-AzureRmSubscription -SubscriptionId xxxx-xxxx-xxxx-xxxx).Name
387
- $name =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).DefaultContext .Subscription.Name
418
+ $name =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context .Subscription.Name
388
419
$name =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Name
389
420
$name =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Name
390
421
```
391
422
392
- ### Breaking Changes to the output Tenant type
423
+ ### Breaking Changes to the output PSAzureTenant Type
393
424
394
425
- The ``` TenantId ``` property was changed to ``` Id ```
395
426
396
427
``` powershell
397
- #old
428
+ # Old
398
429
$id =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).TenantId
399
- $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).DefaultContext .Tenant.TenantId
430
+ $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context .Tenant.TenantId
400
431
$id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.TenantId
401
432
$id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.TenantId
402
433
403
- #new
434
+ # New
404
435
$id =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).Id
405
- $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).DefaultContext .Tenant.Id
436
+ $id =(Add-AzureRmAccount -SubscriptionId xxxx-xxxx-xxxx-xxxx).Context .Tenant.Id
406
437
$id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.Id
407
438
$id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.Id
408
439
```
409
440
410
- - The ``` Domain`` property was changed to ``` Directory```
441
+ - The ``` Domain ``` property was changed to ``` Directory ```
411
442
412
443
``` powershell
413
- #old
444
+ # Old
414
445
$tenantName =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).Domain
415
446
416
- #new
447
+ # New
417
448
$tenantName =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).Directory
418
449
```
0 commit comments