@@ -318,17 +318,17 @@ $RetryPolicy = (Get-AzureStorageQueue -Name $queuename).CloudQueue.ServiceClient
318318
319319## Breaking Changes to Profile Cmdlets
320320
321- The following cmdlets were changed in this release.
321+ The following cmdlets and cmdlet output types were changed in this release.
322322
323323### Add-AzureRmAccount breaking changes
324324
325325- ``` EnvironmentName ``` parameter has been removed and replaced with ``` Environment ``` , the ``` Environment ``` now takes a string and not an ``` AzureEnvironment ``` object
326326
327327``` powershell
328- #Old
328+ # Old
329329Add-AzureRmAccount -EnvironmentName AzureChinaCloud
330330
331- #New
331+ # New
332332Add-AzureRmAccount -Environment AzureChinaCloud
333333```
334334
@@ -337,82 +337,113 @@ Add-AzureRmAccount -Environment AzureChinaCloud
337337``` Select-AzureRmProfile ``` was renamed to ``` Import-AzureRmContext ```
338338
339339``` powershell
340- #Old
340+ # Old
341341Select-AzureRmProfile -Path c:\mydir\myprofile.json
342342
343- #New
344- Import-AzureRmContext -Path c:\mydir\mypforile .json
343+ # New
344+ Import-AzureRmContext -Path c:\mydir\myprofile .json
345345```
346346
347347### Save-AzureRmProfile was renamed to Save-AzureRmContext
348348
349349``` Save-AzureRmProfile ``` was renamed to ``` Save-AzureRmContext ```
350350
351351``` powershell
352- #Old
352+ # Old
353353Save-AzureRmProfile -Path c:\mydir\myprofile.json
354354
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
357372```
358373
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
360391- The ``` SubscriptionId ``` property was changed to ``` Id ```
361392
362393``` powershell
363- #old
394+ # Old
364395$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
366397$id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionId
367398$id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionId
368399
369- #new
400+ # New
370401$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
372403$id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Id
373404$id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Id
374405```
375406
376407- The ``` SubscriptionName ``` property was changed to ``` Name ```
377408
378409``` powershell
379- #old
410+ # Old
380411$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
382413$name =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionName
383414$name =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.SubscriptionName
384415
385- #new
416+ # New
386417$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
388419$name =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Name
389420$name =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Subscription.Name
390421```
391422
392- ### Breaking Changes to the output Tenant type
423+ ### Breaking Changes to the output PSAzureTenant Type
393424
394425- The ``` TenantId ``` property was changed to ``` Id ```
395426
396427``` powershell
397- #old
428+ # Old
398429$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
400431$id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.TenantId
401432$id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.TenantId
402433
403- #new
434+ # New
404435$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
406437$id =(Get-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.Id
407438$id =(Set-AzureRmContext -SubscriptionId xxxx-xxxx-xxxx-xxxx).Tenant.Id
408439```
409440
410- - The ``` Domain`` property was changed to ``` Directory```
441+ - The ``` Domain ``` property was changed to ``` Directory ```
411442
412443``` powershell
413- #old
444+ # Old
414445$tenantName =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).Domain
415446
416- #new
447+ # New
417448$tenantName =(Get-AzureRmTenant -TenantId xxxx-xxxx-xxxx-xxxx).Directory
418449```
0 commit comments