Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

Remove-AzRecoveryServicesVault doesn't delete Service Vault. #9291

Closed Apholisha closed 5 years ago

Apholisha commented 5 years ago

Description

Remove-AzRecoveryServicesVault would fail to delete vault if there are protected items in it. According to the documentation it is not required for the vault to be cleaned up in advance.

https://docs.microsoft.com/en-gb/powershell/module/az.recoveryservices/remove-azrecoveryservicesvault?view=azps-2.1.0

This article explicitly states that the vault does not need to be cleaned up. https://docs.microsoft.com/en-us/azure/site-recovery/delete-vault

Furthermore the error that it gives out normally cryptic. Unless you resolve the error explicitly you would get:

Remove-AzRecoveryServicesVault : Operation failed.
ClientRequestId: 36230edb-1670-4710-9be3-4977a8960566-2019-05-24 08:35:30Z-P
One or more errors occurred.
At line:7 char:1
+ Remove-AzRecoveryServicesVault -Vault $vault
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzRecoveryServicesVault], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.RecoveryServices.RemoveAzureRmRecoveryServicesVault

Steps to reproduce

  1. Create backup Vault with an ARM template
  2. Register at least one VM in it via ARM template
  3. execute:

Select-AzSubscription

$vault = Get-AzRecoveryServicesVault -Name "testTemplated"

Remove-AzRecoveryServicesVault -Vault $vault


## Environment data

Name Value


PSVersion 5.1.17134.765
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.765
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1


## Module versions

```powershell

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands                                             
---------- -------    ----                                ----------------                                             
Script     1.5.2      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enab...
Script     1.4.0      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enab...
Script     1.3.0      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enab...
Script     1.0.1      Az.Aks                              {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredentia...
Script     1.1.0      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServic...
Script     1.0.0      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServic...
Script     1.1.0      Az.ApiManagement                    {Add-AzApiManagementApiToProduct, Add-AzApiManagementProdu...
Script     1.0.0      Az.ApiManagement                    {Add-AzApiManagementRegion, Get-AzApiManagementSsoToken, N...
Script     1.0.0      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Rem...
Script     1.2.2      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHyb...
Script     1.2.1      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHyb...
Script     1.1.0      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHyb...
Script     1.1.0      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAcc...
Script     1.0.0      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAcc...
Script     1.0.0      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollme...
Script     1.2.0      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfil...
Script     1.0.1      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfil...
Script     1.1.1      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAc...
Script     1.0.0      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAc...
Script     2.1.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAv...
Script     2.0.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAv...
Script     1.3.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAv...
Script     1.0.1      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzCont...
Script     1.0.0      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzCont...
Script     1.0.1      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-...
Script     1.1.1      Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFa...
Script     1.0.1      Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFa...
Script     1.0.0      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalytic...
Script     1.2.1      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSt...
Script     1.2.0      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSt...
Script     1.0.2      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSt...
Script     1.0.0      Az.DeploymentManager                {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentMa...
Script     1.0.0      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolic...
Script     1.1.0      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRe...
Script     1.0.0      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRe...
Script     1.1.1      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGr...
Script     1.1.0      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGr...
Script     1.1.0      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzE...
Script     1.0.0      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzE...
Script     1.0.0      Az.FrontDoor                        {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove...
Script     2.0.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wa...
Script     1.0.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wa...
Script     1.1.0      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-A...
Script     1.0.2      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-A...
Script     1.2.0      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, ...
Script     1.0.1      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, ...
Script     1.2.1      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccou...
Script     1.1.0      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccou...
Script     1.1.0      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssocia...
Script     1.0.0      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssocia...
Script     1.0.0      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}             
Script     1.1.0      Az.Media                            {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get...
Script     1.0.0      Az.Media                            {Sync-AzMediaServiceStorageKeys, Set-AzMediaServiceKey, Ge...
Script     1.2.1      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile...
Script     1.2.0      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile...
Script     1.0.0      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile...
Script     1.8.1      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-Az...
Script     1.8.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-Az...
Script     1.1.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-Az...
Script     1.1.0      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorization...
Script     1.0.0      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorization...
Script     1.2.0      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-...
Script     1.0.0      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-...
Script     1.1.0      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSu...
Script     1.0.0      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSu...
Script     1.1.0      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspa...
Script     1.0.0      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspa...
Script     1.4.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServi...
Script     1.0.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServi...
Script     1.1.0      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheSchedul...
Script     1.0.0      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheSchedul...
Script     1.0.1      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNa...
Script     1.0.0      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNa...
Script     1.4.0      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzR...
Script     1.3.1      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzR...
Script     1.1.2      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzR...
Script     1.1.0      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set...
Script     1.0.0      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set...
Script     1.0.1      Az.ServiceFabric                    {Add-AzServiceFabricApplicationCertificate, Add-AzServiceF...
Script     1.0.2      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSig...
Script     1.10.0     Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlData...
Script     1.9.0      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlData...
Script     1.2.0      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlData...
Script     1.3.0      Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStor...
Script     1.0.2      Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStor...
Script     1.0.0      Az.StreamAnalytics                  {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefau...
Script     1.0.1      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTraf...
Script     1.2.1      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServ...
Script     1.1.0      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServ...
Script     5.1.2      Azure                               {Get-AzureAutomationCertificate, Get-AzureAutomationConnec...
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}        
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Script     3.4.0      Pester                              {Describe, Context, It, Should...}                           
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...} 
Script     1.2        PSReadline                          {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHandler, Remov...
Script     1.6.0      ServiceNow                          {Add-ServiceNowAttachment, Get-ServiceNowAttachment, Get-S...
Script     1.5.0      ServiceNow                          {Get-ServiceNowChangeRequest, Get-ServiceNowConfigurationI...

    Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands                                             
---------- -------    ----                                ----------------                                             
Manifest   1.0.0.0    AppBackgroundTask                   {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgro...
Manifest   2.0.0.0    AppLocker                           {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-Ap...
Manifest   1.0.0.0    AppvClient                          {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add...
Manifest   2.0.0.0    Appx                                {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest...
Script     1.0.0.0    AssignedAccess                      {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAcc...
Manifest   1.0.0.0    BitLocker                           {Unlock-BitLocker, Suspend-BitLocker, Resume-BitLocker, Re...
Manifest   2.0.0.0    BitsTransfer                        {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Re...
Manifest   1.0.0.0    BranchCache                         {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disa...
Manifest   1.0.0.0    CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance,...
Manifest   1.0        ConfigCI                            {Get-SystemDriver, New-CIPolicyRule, New-CIPolicy, Get-CIP...
Manifest   1.0        Defender                            {Get-MpPreference, Set-MpPreference, Add-MpPreference, Rem...
Manifest   1.0.0.0    DeliveryOptimization                {Get-DeliveryOptimizationStatus, Get-DeliveryOptimizationP...
Manifest   1.0.0.0    DirectAccessClientComponents        {Disable-DAManualEntryPointSelection, Enable-DAManualEntry...
Script     3.0        Dism                                {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Window...
Manifest   1.0.0.0    DnsClient                           {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get...
Manifest   1.0.0.0    EventTracingManagement              {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceS...
Manifest   2.0.0.0    International                       {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMet...
Manifest   1.0.0.0    iSCSI                               {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-Iscs...
Script     1.0.0.0    ISE                                 {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}          
Manifest   1.0.0.0    Kds                                 {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsC...
Manifest   1.0.1.0    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}                           
Manifest   3.0.0.0    Microsoft.PowerShell.Diagnostics    {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}                          
Manifest   1.0.0.0    Microsoft.PowerShell.LocalAccounts  {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser...
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...
Script     1.0        Microsoft.PowerShell.ODataUtils     Export-ODataEndpointProxy                                    
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}    
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}   
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredS...
Manifest   1.0        MMAgent                             {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...
Manifest   1.0.0.0    MsDtc                               {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTrans...
Manifest   2.0.0.0    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Ne...
Manifest   1.0.0.0    NetConnection                       {Get-NetConnectionProfile, Set-NetConnectionProfile}         
Manifest   1.0.0.0    NetEventPacketCapture               {New-NetEventSession, Remove-NetEventSession, Get-NetEvent...
Manifest   2.0.0.0    NetLbfo                             {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTea...
Manifest   1.0.0.0    NetNat                              {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMa...
Manifest   2.0.0.0    NetQos                              {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, ...
Manifest   2.0.0.0    NetSecurity                         {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPse...
Manifest   1.0.0.0    NetSwitchTeam                       {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTea...
Manifest   1.0.0.0    NetTCPIP                            {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol...
Manifest   1.0.0.0    NetworkConnectivityStatus           {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Rese...
Manifest   1.0.0.0    NetworkSwitchManager                {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEt...
Manifest   1.0.0.0    NetworkTransition                   {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfig...
Manifest   1.0.0.0    PcsvDevice                          {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restar...
Binary     1.0.0.0    PersistentMemory                    {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegio...
Manifest   1.0.0.0    PKI                                 {Add-CertificateEnrollmentPolicyServer, Export-Certificate...
Manifest   1.0.0.0    PnpDevice                           {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, D...
Manifest   1.1        PrintManagement                     {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-Prin...
Binary     1.0.11     ProcessMitigations                  {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-P...
Script     3.0        Provisioning                        {Install-ProvisioningPackage, Export-ProvisioningPackage, ...
Manifest   1.1        PSDesiredStateConfiguration         {Set-DscLocalConfigurationManager, Start-DscConfiguration,...
Script     1.0.0.0    PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WS...
Binary     1.1.0.0    PSScheduledJob                      {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Jo...
Manifest   2.0.0.0    PSWorkflow                          {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn} 
Manifest   1.0.0.0    PSWorkflowUtility                   Invoke-AsWorkflow                                            
Manifest   1.0.0.0    ScheduledTasks                      {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledT...
Manifest   2.0.0.0    SecureBoot                          {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBoo...
Manifest   2.0.0.0    SmbShare                            {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbSha...
Manifest   2.0.0.0    SmbWitness                          {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...
Manifest   1.0.0.0    StartLayout                         {Export-StartLayout, Import-StartLayout, Export-StartLayou...
Manifest   2.0.0.0    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add...
Manifest   2.0.0.0    TLS                                 {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disa...
Manifest   1.0.0.0    TroubleshootingPack                 {Get-TroubleshootingPack, Invoke-TroubleshootingPack}        
Manifest   2.0.0.0    TrustedPlatformModule               {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...}         
Binary     2.1.639.0  UEV                                 {Clear-UevConfiguration, Clear-UevAppxPackage, Restore-Uev...
Manifest   2.0.0.0    VpnClient                           {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnectio...
Manifest   1.0.0.0    Wdac                                {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...}
Manifest   1.0.0.0    WindowsDeveloperLicense             {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperL...
Script     1.0        WindowsErrorReporting               {Enable-WindowsErrorReporting, Disable-WindowsErrorReporti...
Manifest   1.0.0.0    WindowsSearch                       {Get-WindowsSearchSetting, Set-WindowsSearchSetting}         
Manifest   1.0.0.0    WindowsUpdate                       Get-WindowsUpdateLog                                         
Manifest   1.0.0.2    WindowsUpdateProvider               {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastSca...

    Directory: C:\Program Files\Citrix\Broker\Modules

ModuleType Version    Name                                ExportedCommands                                             
---------- -------    ----                                ----------------                                             
Script     1.0        Citrix.Common.Commands              Get-CtxIcon                                                  

Debug output


[24/05/2019 11:04:47] C:\Windows\system32 >
PS>$vault = Get-AzRecoveryServicesVault -Name "testTemplated"
DEBUG: 11:04:56 - GetAzureRmRecoveryServicesVaults begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 11:04:56 - using account id '<redacted>'...
DEBUG: [Common.Authentication]: Authenticating using Account: '<redacted>', environment: 'AzureCloud', tenant: '<tenantID>'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '<tenantID>', Endpoint: 'https://login.microsoftonline.com/', ClientId: '<clientID>', ClientRedirect: '<ClientRedirect>', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/<tenantID>/', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '<tenantID>', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '<clientID>', ClientRedirectUri: <ClientRedirect>
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3110365Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3110365Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3110365Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: === Token Acquisition started: 
    CacheType: null
    Authentication Target: User
    , Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3110365Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: === Token Acquisition started:
    Authority: https://login.microsoftonline.com/<tenantID>/
    Resource: https://management.core.windows.net/
    ClientId: <clientID>
    CacheType: null
    Authentication Target: User
DEBUG: [ADAL]: Verbose: 2019-05-24T09:04:56.3110365Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Verbose: 2019-05-24T09:04:56.3110365Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3120338Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 6 items to token cache.
DEBUG: [ADAL]: Verbose: 2019-05-24T09:04:56.3120338Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Verbose: 2019-05-24T09:04:56.3120338Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3120338Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3120338Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3125136Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: 28.6993247733333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3125136Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: 28.6993247733333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3125136Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3125136Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3125136Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 24/05/2019 09:33:38 +00:00
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3125136Z: 5a16d9dc-a5d4-4607-b700-2d1a2821e79c - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 24/05/2019 09:33:38 +00:00Access Token Hash: R+c4IMOVcq8Vb+THIB1v9lcGczccl1snselEoZ8Q05Q=
     User id: 5e3aaa18-f059-4d28-924e-7f6c0b2740b7
DEBUG: [Common.Authentication]: Authenticating using Account: '<redacted>', environment: 'AzureCloud', tenant: '<tenantID>'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '<tenantID>', Endpoint: 'https://login.microsoftonline.com/', ClientId: '<clientID>', ClientRedirect: '<ClientRedirect>', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/<tenantID>/', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '<tenantID>', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '<clientID>', ClientRedirectUri: <ClientRedirect>
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3145116Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3145116Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3145116Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: === Token Acquisition started: 
    CacheType: null
    Authentication Target: User
    , Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3145116Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: === Token Acquisition started:
    Authority: https://login.microsoftonline.com/<tenantID>/
    Resource: https://management.core.windows.net/
    ClientId: <clientID>
    CacheType: null
    Authentication Target: User
DEBUG: [ADAL]: Verbose: 2019-05-24T09:04:56.3145116Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Verbose: 2019-05-24T09:04:56.3145116Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3155277Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 6 items to token cache.
DEBUG: [ADAL]: Verbose: 2019-05-24T09:04:56.3155277Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Verbose: 2019-05-24T09:04:56.3155277Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3155277Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3155277Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3155277Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: 28.6992745383333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3155277Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: 28.6992745383333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3160093Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3160093Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3160093Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 24/05/2019 09:33:38 +00:00
DEBUG: [ADAL]: Information: 2019-05-24T09:04:56.3160093Z: 4eae838c-2798-4329-ad49-7cf78e25e97f - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 24/05/2019 09:33:38 +00:00Access Token Hash: R+c4IMOVcq8Vb+THIB1v9lcGczccl1snselEoZ8Q05Q=
     User id: 5e3aaa18-f059-4d28-924e-7f6c0b2740b7
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:56 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:41.9554741'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourcegroups?api-version=2016-09-01

Headers:
x-ms-client-request-id        : b5ab508b-2e15-4077-b8d7-e91558fdf125-2019-05-24 09:04:56Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11988
x-ms-request-id               : beafe560-4048-4d17-ae57-ca02503431c8
x-ms-correlation-request-id   : beafe560-4048-4d17-ae57-ca02503431c8
x-ms-routing-request-id       : UKSOUTH2:20190524T090456Z:beafe560-4048-4d17-ae57-ca02503431c8
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:56 GMT

Body:
{
  "value": [
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-backup-rg",
      "name": "demo-backup-rg",
      "location": "westeurope",
      "tags": {},
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-infra-rg",
      "name": "demo-infra-rg",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-keyVaults-rg",
      "name": "demo-keyVaults-rg",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-keyVaults-rg2",
      "name": "demo-keyVaults-rg2",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-mediumVMs-rg",
      "name": "demo-mediumVMs-rg",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-mediumVMs-rg2",
      "name": "demo-mediumVMs-rg2",
      "location": "westeurope",
      "tags": {},
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-net-rg",
      "name": "demo-net-rg",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-nsg-rg",
      "name": "demo-nsg-rg",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/demo-storage-rg",
      "name": "demo-storage-rg",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/hub-network-rg",
      "name": "hub-network-rg",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    },
    {
      "id": "/subscriptions/<redacted>/resourceGroups/NetworkWatcherRG",
      "name": "NetworkWatcherRG",
      "location": "westeurope",
      "properties": {
        "provisioningState": "Succeeded"
      }
    }
  ]
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:56 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:41.7219586'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-backup-rg/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : a3a0e789-bd75-4143-9487-dad6a12a0fb8-2019-05-24 09:04:56Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
X-Content-Type-Options        : nosniff
x-ms-request-id               : 12eb88c7-c38e-4eff-93d9-134c99202420
x-ms-client-request-id        : 30579f9d-d32a-4bb8-ada4-efb203c06c35
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-correlation-request-id   : 12eb88c7-c38e-4eff-93d9-134c99202420
x-ms-routing-request-id       : UKSOUTH2:20190524T090456Z:12eb88c7-c38e-4eff-93d9-134c99202420
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:56 GMT
Server                        : Microsoft-IIS/10.0

Body:
{
  "value": [
    {
      "location": "westeurope",
      "name": "testTemplated",
      "etag": "W/\"datetime'2019-05-24T07%3A25%3A59.8692762Z'\"",
      "properties": {
        "provisioningState": "Succeeded"
      },
      "id": "/subscriptions/<redacted>/resourceGroups/demo-backup-rg/providers/Microsoft.RecoveryServices/vaults/testTemplated",
      "type": "Microsoft.RecoveryServices/vaults",
      "sku": {
        "name": "RS0",
        "tier": "Standard"
      }
    },
    {
      "location": "westeurope",
      "name": "vault587",
      "etag": "W/\"datetime'2019-05-24T09%3A01%3A37.2466424Z'\"",
      "properties": {
        "provisioningState": "Succeeded"
      },
      "id": "/subscriptions/<redacted>/resourceGroups/demo-backup-rg/providers/Microsoft.RecoveryServices/vaults/vault587",
      "type": "Microsoft.RecoveryServices/vaults",
      "sku": {
        "name": "RS0",
        "tier": "Standard"
      }
    }
  ]
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:41.0437904'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-infra-rg/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : 57de863d-c171-4d6e-974f-485a6ed04681-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id               : bbf8bd6a-0ccf-4767-b254-96fa416af063
x-ms-correlation-request-id   : bbf8bd6a-0ccf-4767-b254-96fa416af063
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:bbf8bd6a-0ccf-4767-b254-96fa416af063
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.9678749'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-keyVaults-rg/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : cb70579b-37c3-471c-a75a-b9484a3e510c-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11997
x-ms-request-id               : 82c89f57-b148-46df-a294-490df7f0c104
x-ms-correlation-request-id   : 82c89f57-b148-46df-a294-490df7f0c104
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:82c89f57-b148-46df-a294-490df7f0c104
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.8886246'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-keyVaults-rg2/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : 46698f1d-5e22-429a-a204-269259bacd20-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11996
x-ms-request-id               : 64b86f5d-f70f-4642-8e4a-11fc7f738174
x-ms-correlation-request-id   : 64b86f5d-f70f-4642-8e4a-11fc7f738174
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:64b86f5d-f70f-4642-8e4a-11fc7f738174
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.8105148'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-mediumVMs-rg/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : d2d82260-2710-4077-9456-b1bd786092a9-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11995
x-ms-request-id               : 370f337d-8e1e-4e4d-9642-4112bf9ea57d
x-ms-correlation-request-id   : 370f337d-8e1e-4e4d-9642-4112bf9ea57d
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:370f337d-8e1e-4e4d-9642-4112bf9ea57d
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.7304579'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-mediumVMs-rg2/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : 3e9253f9-a6af-478e-8a3a-b2d6bf783691-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11994
x-ms-request-id               : 0054f1cb-c7fb-4a5c-af8f-ad521d84ab8d
x-ms-correlation-request-id   : 0054f1cb-c7fb-4a5c-af8f-ad521d84ab8d
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:0054f1cb-c7fb-4a5c-af8f-ad521d84ab8d
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.5826830'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-net-rg/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : 8a71ca77-bcd1-4102-ab9c-0fb8087336d3-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11993
x-ms-request-id               : 63647180-97ba-4090-9000-aafcff90cafc
x-ms-correlation-request-id   : 63647180-97ba-4090-9000-aafcff90cafc
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:63647180-97ba-4090-9000-aafcff90cafc
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.5007302'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-nsg-rg/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : 579dda06-97ed-40ea-a752-9cf36f7ee7ac-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11992
x-ms-request-id               : 13c50abc-5a38-4621-9c74-21e1a19986f6
x-ms-correlation-request-id   : 13c50abc-5a38-4621-9c74-21e1a19986f6
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:13c50abc-5a38-4621-9c74-21e1a19986f6
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.4193147'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-storage-rg/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : bfe2f0fc-2509-4f89-81b8-bafb41438db9-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11991
x-ms-request-id               : c011e541-898e-41fc-addd-527243a5572e
x-ms-correlation-request-id   : c011e541-898e-41fc-addd-527243a5572e
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:c011e541-898e-41fc-addd-527243a5572e
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:57 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.3424648'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/hub-network-rg/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : 6e6c4ef2-6486-44e1-a66f-c5a27e9235e9-2019-05-24 09:04:57Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11990
x-ms-request-id               : cd84caa9-b870-4159-84a3-924a46fa232e
x-ms-correlation-request-id   : cd84caa9-b870-4159-84a3-924a46fa232e
x-ms-routing-request-id       : UKSOUTH2:20190524T090457Z:cd84caa9-b870-4159-84a3-924a46fa232e
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:04:58 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:40.2480899'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/NetworkWatcherRG/providers/Microsoft.RecoveryServices/vaults?api-version=2016-06-01

Headers:
x-ms-client-request-id        : d00d63ba-09c3-467d-8242-e7c5539d7cff-2019-05-24 09:04:58Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11989
x-ms-request-id               : c37e7414-0e87-471f-9fc0-9c7e892cfc8e
x-ms-correlation-request-id   : c37e7414-0e87-471f-9fc0-9c7e892cfc8e
x-ms-routing-request-id       : UKSOUTH2:20190524T090458Z:c37e7414-0e87-471f-9fc0-9c7e892cfc8e
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Fri, 24 May 2019 09:04:57 GMT

Body:
{
  "value": []
}
DEBUG: AzureQoSEvent: CommandName - Get-AzRecoveryServicesVault; IsSuccess - True; Duration - 00:00:01.8102267; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 11:04:59 - GetAzureRmRecoveryServicesVaults end processing.
DEBUG: 11:04:59 - GetAzureRmRecoveryServicesVaults end processing.
[24/05/2019 11:04:59] C:\Windows\system32 >
PS>Remove-AzRecoveryServicesVault -Vault $vault
DEBUG: 11:05:09 - RemoveAzureRmRecoveryServicesVault begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 11:05:09 - using account id '<redacted>'...
DEBUG: [Common.Authentication]: Authenticating using Account: '<redacted>', environment: 'AzureCloud', tenant: '<tenantID>'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '<tenantID>', Endpoint: 'https://login.microsoftonline.com/', ClientId: '<clientID>', ClientRedirect: '<ClientRedirect>', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/<tenantID>/', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '<tenantID>', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '<clientID>', ClientRedirectUri: <ClientRedirect>
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2552492Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2557479Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2557479Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: === Token Acquisition started: 
    CacheType: null
    Authentication Target: User
    , Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2557479Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: === Token Acquisition started:
    Authority: https://login.microsoftonline.com/<tenantID>/
    Resource: https://management.core.windows.net/
    ClientId: <clientID>
    CacheType: null
    Authentication Target: User
DEBUG: [ADAL]: Verbose: 2019-05-24T09:05:09.2557479Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Verbose: 2019-05-24T09:05:09.2557479Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2572652Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 6 items to token cache.
DEBUG: [ADAL]: Verbose: 2019-05-24T09:05:09.2572652Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Verbose: 2019-05-24T09:05:09.2572652Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2572652Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2572652Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2572652Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: 28.4835789133333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2572652Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: 28.4835789133333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2572652Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2572652Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2577643Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 24/05/2019 09:33:38 +00:00
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2577643Z: 73845f20-e605-4fed-895d-7f584e8676c3 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 24/05/2019 09:33:38 +00:00Access Token Hash: R+c4IMOVcq8Vb+THIB1v9lcGczccl1snselEoZ8Q05Q=
     User id: 5e3aaa18-f059-4d28-924e-7f6c0b2740b7
DEBUG: [Common.Authentication]: Authenticating using Account: '<redacted>', environment: 'AzureCloud', tenant: '<tenantID>'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '<tenantID>', Endpoint: 'https://login.microsoftonline.com/', ClientId: '<clientID>', ClientRedirect: '<ClientRedirect>', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/<tenantID>/', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '<tenantID>', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '<clientID>', ClientRedirectUri: <ClientRedirect>
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2582634Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2582634Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2582634Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: === Token Acquisition started: 
    CacheType: null
    Authentication Target: User
    , Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2582634Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: === Token Acquisition started:
    Authority: https://login.microsoftonline.com/<tenantID>/
    Resource: https://management.core.windows.net/
    ClientId: <clientID>
    CacheType: null
    Authentication Target: User
DEBUG: [ADAL]: Verbose: 2019-05-24T09:05:09.2582634Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Verbose: 2019-05-24T09:05:09.2582634Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2597602Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 6 items to token cache.
DEBUG: [ADAL]: Verbose: 2019-05-24T09:05:09.2597602Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Verbose: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: 28.4835290133333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: 28.4835290133333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 24/05/2019 09:33:38 +00:00
DEBUG: [ADAL]: Information: 2019-05-24T09:05:09.2602592Z: 30b9924b-5573-4617-bb1d-2c364746c50e - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 24/05/2019 09:33:38 +00:00Access Token Hash: R+c4IMOVcq8Vb+THIB1v9lcGczccl1snselEoZ8Q05Q=
     User id: 5e3aaa18-f059-4d28-924e-7f6c0b2740b7
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '05/24/2019 09:33:38 +00:00', MultipleResource? 'True', Tenant: '<tenantID>', UserId: '<redacted>'
DEBUG: [Common.Authentication]: User info for token DisplayId: '<redacted>', Name: <redacted>, IdProvider: 'https://sts.windows.net/<tenantID>/', Uid: '5e3aaa18-f059-4d28-924e-7f6c0b2740b7'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '05/24/2019 09:33:38 +00:00' Comparing to '05/24/2019 09:05:09 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:28:29.0112417'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
DELETE

Absolute Uri:
https://management.azure.com/subscriptions/<redacted>/resourceGroups/demo-backup-rg/providers/Microsoft.RecoveryServices/vaults/testTemplated?api-version=2016-06-01

Headers:
x-ms-client-request-id        : 430994e7-3b9c-487d-b83f-568483b4a0ef-2019-05-24 09:05:09Z-P
accept-language               : en-US

Body:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Pragma                        : no-cache
Cache-Control                 : no-cache
Server                        : Microsoft-IIS/10.0,Microsoft-IIS/10.0
X-Content-Type-Options        : nosniff
x-ms-request-id               : db607192-27be-45e4-a6be-50663f13b433
x-ms-client-request-id        : a695e726-2a96-4a89-be5b-adbd54a47538,a695e726-2a96-4a89-be5b-adbd54a47538
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-ratelimit-remaining-subscription-deletes: 14999
x-ms-correlation-request-id   : db607192-27be-45e4-a6be-50663f13b433
x-ms-routing-request-id       : UKSOUTH2:20190524T090510Z:db607192-27be-45e4-a6be-50663f13b433
Date                          : Fri, 24 May 2019 09:05:10 GMT

Body:
{
  "error": {
    "code": "ServiceResourceNotEmptyWithContainerDetails",
    "message": " Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no backup items, protected servers or backup management servers associated with this vault. Unregister the following containers associated with this vault before proceeding for deletion : baseline-vm1 \nUnregister all containers from the vault and then retry to delete vault",
    "target": null,
    "details": null,
    "innerError": null
  }
}
Remove-AzRecoveryServicesVault : Operation failed.
ClientRequestId: 430994e7-3b9c-487d-b83f-568483b4a0ef-2019-05-24 09:05:09Z-P
One or more errors occurred.
At line:1 char:1
+ Remove-AzRecoveryServicesVault -Vault $vault
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzRecoveryServicesVault], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.RecoveryServices.RemoveAzureRmRecoveryServicesVault
Remove-AzRecoveryServicesVault : Operation failed.
ClientRequestId: 430994e7-3b9c-487d-b83f-568483b4a0ef-2019-05-24 09:05:09Z-P
One or more errors occurred.
At line:1 char:1
+ Remove-AzRecoveryServicesVault -Vault $vault
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzRecoveryServicesVault], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.RecoveryServices.RemoveAzureRmRecoveryServicesVault

DEBUG: AzureQoSEvent: CommandName - Remove-AzRecoveryServicesVault; IsSuccess - False; Duration - 00:00:01.5615626; Exception - System.Exception: Operation failed.
ClientRequestId: 430994e7-3b9c-487d-b83f-568483b4a0ef-2019-05-24 09:05:09Z-P
One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Microsoft.Rest.Azure.CloudException:  Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no backup items, protected servers or backup management servers associated with this vault. Unregister the following containers associated with this vault before proceeding for deletion : baseline-vm1 
Unregister all containers from the vault and then retry to delete vault
   at Microsoft.Azure.Management.RecoveryServices.VaultsOperations.<DeleteWithHttpMessagesAsync>d__9.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.Azure.Commands.RecoveryServices.PSRecoveryServicesClient.DeleteVault(String resouceGroupName, String vaultName)
   at Microsoft.Azure.Commands.RecoveryServices.RemoveAzureRmRecoveryServicesVault.ExecuteCmdlet()
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Commands.RecoveryServices.RecoveryServicesCmdletBase.HandleException(Exception ex)
   at Microsoft.Azure.Commands.RecoveryServices.RemoveAzureRmRecoveryServicesVault.ExecuteCmdlet()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 11:05:11 - RemoveAzureRmRecoveryServicesVault end processing.
DEBUG: 11:05:11 - RemoveAzureRmRecoveryServicesVault end processing.
[24/05/2019 11:05:11] C:\Windows\system32 >

Error output


   HistoryId: 12

Message        : Operation failed.
                 ClientRequestId: 430994e7-3b9c-487d-b83f-568483b4a0ef-2019-05-24 09:05:09Z-P
                 One or more errors occurred.
StackTrace     :    at Microsoft.Azure.Commands.RecoveryServices.RecoveryServicesCmdletBase.HandleException(Exception 
                 ex)
                    at Microsoft.Azure.Commands.RecoveryServices.RemoveAzureRmRecoveryServicesVault.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception      : System.Exception
InvocationInfo : {Remove-AzRecoveryServicesVault}
Line           : Remove-AzRecoveryServicesVault -Vault $vault
Position       : At line:1 char:1
                 + Remove-AzRecoveryServicesVault -Vault $vault
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 12

RequestId      : db607192-27be-45e4-a6be-50663f13b433
Message        :  Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no 
                 backup items, protected servers or backup management servers associated with this vault. Unregister 
                 the following containers associated with this vault before proceeding for deletion : baseline-vm1 
                 Unregister all containers from the vault and then retry to delete vault
ServerMessage  : ServiceResourceNotEmptyWithContainerDetails:  Vault cannot be deleted as there are existing resources 
                 within the vault. Please ensure there are no backup items, protected servers or backup management 
                 servers associated with this vault. Unregister the following containers associated with this vault 
                 before proceeding for deletion : baseline-vm1 
                 Unregister all containers from the vault and then retry to delete vault 
                 (System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError])
ServerResponse : {BadRequest}
RequestMessage : {DELETE https://management.azure.com/subscriptions/2f6f29fb-f304-405f-8dba-4325d55b5b53/resourceGroups
                 /demo-backup-rg/providers/Microsoft.RecoveryServices/vaults/testTemplated?api-version=2016-06-01}
InvocationInfo : {Remove-AzRecoveryServicesVault}
Line           : Remove-AzRecoveryServicesVault -Vault $vault
Position       : At line:1 char:1
                 + Remove-AzRecoveryServicesVault -Vault $vault
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Management.RecoveryServices.VaultsOperations.<DeleteWithHttpMessagesAsync>d__9.M
                 oveNext()
HistoryId      : 12

   HistoryId: 3

Message        : Operation failed.
                 ClientRequestId: 38ad2fa2-c90d-4eb6-b6e8-9528bbe5855d-2019-05-24 08:57:27Z-P
                 One or more errors occurred.
StackTrace     :    at Microsoft.Azure.Commands.RecoveryServices.RecoveryServicesCmdletBase.HandleException(Exception 
                 ex)
                    at Microsoft.Azure.Commands.RecoveryServices.RemoveAzureRmRecoveryServicesVault.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception      : System.Exception
InvocationInfo : {Remove-AzRecoveryServicesVault}
Line           : Remove-AzRecoveryServicesVault -Vault $vault
Position       : At line:1 char:1
                 + Remove-AzRecoveryServicesVault -Vault $vault
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 3

RequestId      : da6efb0b-32f5-4ae2-beea-2b5c25bf68b6
Message        :  Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no 
                 backup items, protected servers or backup management servers associated with this vault. Unregister 
                 the following containers associated with this vault before proceeding for deletion : baseline-vm1 
                 Unregister all containers from the vault and then retry to delete vault
ServerMessage  : ServiceResourceNotEmptyWithContainerDetails:  Vault cannot be deleted as there are existing resources 
                 within the vault. Please ensure there are no backup items, protected servers or backup management 
                 servers associated with this vault. Unregister the following containers associated with this vault 
                 before proceeding for deletion : baseline-vm1 
                 Unregister all containers from the vault and then retry to delete vault 
                 (System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError])
ServerResponse : {BadRequest}
RequestMessage : {DELETE https://management.azure.com/subscriptions/2f6f29fb-f304-405f-8dba-4325d55b5b53/resourceGroups
                 /demo-backup-rg/providers/Microsoft.RecoveryServices/vaults/testTemplated?api-version=2016-06-01}
InvocationInfo : {Remove-AzRecoveryServicesVault}
Line           : Remove-AzRecoveryServicesVault -Vault $vault
Position       : At line:1 char:1
                 + Remove-AzRecoveryServicesVault -Vault $vault
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Management.RecoveryServices.VaultsOperations.<DeleteWithHttpMessagesAsync>d__9.M
                 oveNext()
HistoryId      : 3
markcowl commented 5 years ago

@siddharth7 Can you take a look?

siddharth7 commented 5 years ago

@apholisha the documentation that you mentioned belongs to azure site recovery vault. If you are referring to the backup vault, this is the correct documentation (https://docs.microsoft.com/en-us/azure/backup/backup-azure-delete-vault). It also mentions that you need to remove all protected items and unregister containers before deleting the vault.

Apholisha commented 5 years ago

Apologies , I thought all Backup vaults have been upgraded to Recovery Services vaults. and they are now essentially the same.

Regardless - the feature would be nice to have. I did write myself a function to do it, but it would be nice to have it as a parameter for example.

siddharth7 commented 5 years ago

It is not provided as a feature to avoid deleting vaults by mistake as it is an irreversible process.