azure-files-samples
azure-files-samples copied to clipboard
Unable to import module AzFilesHybrid
Getting the following error importing the module:
Import-Module : The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
At line:1 char:1
+ Import-Module AzFilesHybrid
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
Make sure the AzFilesHybrid folder is unzipped and copied to one or your PowerShell module paths. There is a script included in the unzipped contents to do this for you too.
powershell.exe / pwsh.exe
set-location -path C:\path\to\AzFilesHybrid
set-executionpolicy -scope currentuser -executionpolicy unrestricted
.\CopyToPSPath.ps1
I did everything @pauldapps suggested, as the Powershell script in the Microsoft documentation has the same thing basically, but still getting this error. Running with admin access doesn't help.
Any resolution for anybody?