Closed Manvendra11 closed 3 years ago
@Manvendra11 This doesn't look like it is anything related to PSRule as we don't use Set-AzRecoveryServicesAsrVaultContext
at all. Are you able to post additional information for PSRule if this is related?
Are you looking for Azure PowerShell help?
@Manvendra11 I'm going to close this issue because there is not enough information. If you are able to collect some more information please let me know.
For general Azure PowerShell issues see https://github.com/Azure/azure-powershell
Description of the issue WARNING: Unable to cast object of type 'Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext' to type 'Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureContext '. Set-AzRecoveryServicesAsrVaultContext : Operation failed. Download vault credential file using cmdlet Get-AzRecoveryServicesVaultSettingsFile and Import-AzRecoveryServicesAsrVaultSettingsFile At line:1 char:1
To Reproduce $Sub = Get-AzSubscription -SubscriptionName ''
Steps to reproduce the issue:
Expected behaviour Error output
Az Modules ModuleType Version Name ExportedCommands
Script 2.2.5 Az.Accounts {Add-AzEnvironment, Clear-AzContext, Clear-AzDefault, Connect-AzAccount...}
ModuleType Version Name ExportedCommands
Script 3.4.0 Az.RecoveryServices {Add-AzRecoveryServicesAsrReplicationProtectedItemDisk, Backup-AzRecoveryServicesBackupItem, Copy-AzRecoveryServicesVaul..