diff --git a/Automation/ARI_Automation.ps1 b/Automation/ARI_Automation.ps1 index 85726c9..1c774c6 100644 --- a/Automation/ARI_Automation.ps1 +++ b/Automation/ARI_Automation.ps1 @@ -12,7 +12,7 @@ https://github.com/microsoft/ARI/Automation/ARI_Automation.ps1 This powershell Script is part of Azure Resource Inventory (ARI) .NOTES -Version: 3.1.4 +Version: 3.1.6 First Release Date: 19th November, 2020 Authors: Claudio Merola @@ -47,7 +47,7 @@ $RunDebug = $false <######################################################### SCRIPT ######################################################################> -Clear-AzContext -Force +#Clear-AzContext -Force Connect-AzAccount -Identity @@ -94,7 +94,7 @@ Write-Output 'Extracting Advisories' } -$Subscriptions = Get-AzContext -ListAvailable | Where-Object {$_.Subscription.State -ne 'Disabled'} +$Subscriptions = Get-AzSubscription | Where-Object {$_.State -ne 'Disabled'} $Subscriptions = $Subscriptions.Subscription if($RunDebug) { @@ -258,4 +258,4 @@ Write-Output 'Uploading Excel File to Storage Account' Set-AzStorageBlobContent -File $File -Container $aristg -Context $Context | Out-Null if($Diagram){Set-AzStorageBlobContent -File $DDFile -Container $aristg -Context $Context | Out-Null} -Write-Output 'Completed' \ No newline at end of file +Write-Output 'Completed'