AzureOfflineBackupDiskPrep fails with Unable to import Azure module

Rahul Sukumar 141 Reputation points
2020-09-22T23:37:36.97+00:00

I am attempting to do an offline backup to create a seed drive to ship to MS. I am following this guide:
https://learn.microsoft.com/en-us/azure/backup/backup-azure-backup-import-export

I get all the way to Prepare SATA drives and ship to Azure. I have a SATA drive installed on my PC (7TB). I have installed the Azure powershell module. When running azureofflinebackupdiskprep.exe s:\share it fails right after it asks me if I want to format the specified drive with this:

Unable to import azure module .Exception :Desired module is not installed
Unable to access the azure resources of the customer subscriptionDesired module is not installed

Desired module is not installed

Warning : Disk preparation completed with errors. Please refer to the AzureOfflineBackupDiskPrep logs at location [C:\AzureOfflineBackupDiskPrep] for details

Any ideas? Thanks.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,192 questions
{count} votes

Accepted answer
  1. FISCHER Peter 76 Reputation points
    2020-09-23T12:51:48.353+00:00

    Had the same issue today.
    Changing the Execution Policy as mentioned didn't solved the problem for me.

    What solved the problem for me was to install the required (https://learn.microsoft.com/en-us/azure/backup/backup-azure-backup-server-import-export#prepare-sata-drives-and-ship-to-azure) Azure PowerShell in version 3.7.0, although this should not be necessary on a DPM or MABS server:
    Install-Module -Name AzureRM -RequiredVersion 3.7.0 -Scope AllUsers -AllowClobber


1 additional answer

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 41,716 Reputation points Microsoft Employee
    2020-09-23T07:31:12.967+00:00

    @Rahul Sukumar Sorry for the inconvenience this must have caused.

    Please follow the steps below:

    From PowerShell as admin, run Get-ExecutionPolicy -List if Local Machine has undefined execution policy granted
    Change the execution Policy for local machine to “Unrestricted” to allow script running, by running : Set-ExecutionPolicy Unrestricted

    For further details about Execution Policy: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-6#short-description

    Please feel free to get back to us if need further assistance in this matter.

    ------------------------------------------------------------------------------------------------------------------------------

    Please do not forget to "Accept the answer" and "Up-Vote" wherever the information provided helps you to help others in the community.

    0 comments No comments