Find-AzureRmResource fails or cannot be found after you update Azure modules

This article provides a resolution to an issue in which the Find-AzureRmResource cmdlet fails or cannot be found after you update Azure modules.

Original product version:   Azure Automation
Original KB number:   4338620

Symptoms

After you update the Microsoft Azure modules in your automation account, any runbook that uses the Find-AzureRmResource cmdlet fails and returns an exception, or it records an error entry that states that the program cannot find the Find-AzureRmResource  cmdlet.

Cause

Starting in Microsoft AzureRM 6.0.0, the Find-AzureRmResource cmdlet functionality is merged with the Get-AzureRmResource cmdlet, and the Find-AzureRmResource cmdlet is removed. This is noted in the Azure PowerShell 6.0.0 migration guide.

Resolution

To fix this issue, update your runbooks to use Get-AzureRmResource instead of Find-AzureRmResource. For more information, see the usage of Get-AzureRmResource.

Contact us for help

If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.