You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
please i have an issue related to when i am going to export data from azure i am facing the below warning and there is no Json file exported from azure side and i have tried a lot of articles to uninstall AzureRm "Uninstall-AzureRm" but facing another error and not able to Uninstall it
1-so, anyone faced the same issue and how i can fix it
2-is the mentioned warning can Couse the issue related that there is no json file exported from azure side
3-i am not able to export the Json file
Error messages
WARNING: Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide
@MoZiZ00 I don't think the warning should impact running of PSRule in this case. Things to try:
Import the Az PowerShell module directly on a fresh command line before running PSRule. e.g. Import-Module Az.Accounts.
Verify you are connected to a subscription, by running Get-AzContext and Get-AzResourceGroup. If not connected use Connect-AzAccount. If you are unable to list resource groups, then this could indicate that you don't have Reader permissions in the current session or need to activate Privilege Identity Management (PIM) if you use PIM in your environment.
Try running Export-AzRuleData with -Verbose to get additional logs that may provide additional information to help diagnose the issue.
Existing rule
No response
Description of the issue
Hi All,
please i have an issue related to when i am going to export data from azure i am facing the below warning and there is no Json file exported from azure side and i have tried a lot of articles to uninstall AzureRm "Uninstall-AzureRm" but facing another error and not able to Uninstall it
1-so, anyone faced the same issue and how i can fix it
2-is the mentioned warning can Couse the issue related that there is no json file exported from azure side
3-i am not able to export the Json file
Error messages
WARNING: Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide
Reproduction
i am using this command to export the azure data
Version of PSRule
2.9.0
Version of PSRule for Azure
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: