hawk icon indicating copy to clipboard operation
hawk copied to clipboard

Import-Module HAWK Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified.

Open jleroxGWNTC opened this issue 1 year ago • 2 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Attempt to Run Start-HawkInvestigation
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem. image

The files seem to be in netcore folder instead.

File (please complete the following information):

  • File Name:

Additional context

Start-HawkTenantInvestigation Start-HawkTenantInvestigation : The 'Start-HawkTenantInvestigation' command was found in the module 'HAWK', but the module could not be loaded. For more information, run 'Import-Module HAWK'. At line:1 char:1

  • Start-HawkTenantInvestigation
  •   + CategoryInfo          : ObjectNotFound: (Start-HawkTenantInvestigation:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
    
    

PS C:\Windows\system32> Import-Module HAWK Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified. At line:1 char:1

  • Import-Module HAWK
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    
    

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PS C:\Windows\system32> Connect-AzureAD WARNING: Install the latest PowerShell module, the Microsoft Graph PowerShell SDK, for new features and improvements! https://aka.ms/graphPSmigration

Account Environment TenantId TenantDomain AccountType


******** AzureCloud b5d4688c-a846-4007-834f-0281b485d64e ******** User

PS C:\Windows\system32> Connect-MsolService PS C:\Windows\system32> Connect-ExchangeOnline


This V3 EXO PowerShell module contains new REST API backed Exchange Online cmdlets which doesn't require WinRM for Client-Server communication. You can now run these cmdlets after turning off WinRM Basic Auth in your client machine thus making it more secure.

Unlike the EXO* prefixed cmdlets, the cmdlets in this module support full functional parity with the RPS (V1) cmdlets.

V3 cmdlets in the downloaded module are resilient to transient failures, handling retries and throttling errors inherently.

REST backed EOP and SCC cmdlets are also available in the V3 module. Similar to EXO, the cmdlets can be run without WinRM basic auth enabled.

For more information check https://aka.ms/exov3-module

PS C:\Windows\system32> Start-HawkTenantInvestigation Start-HawkTenantInvestigation : The 'Start-HawkTenantInvestigation' command was found in the module 'HAWK', but the module could not be loaded. For more information, run 'Import-Module HAWK'. At line:1 char:1

  • Start-HawkTenantInvestigation
  •   + CategoryInfo          : ObjectNotFound: (Start-HawkTenantInvestigation:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
    
    

PS C:\Windows\system32> Import-Module HAWK Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified. At line:1 char:1

  • Import-Module HAWK
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

PS C:\Windows\system32> Import-Module hawk Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified. At line:1 char:1

  • Import-Module hawk
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

PS C:\Windows\system32> Import-Module hawk Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified. At line:1 char:1

  • Import-Module hawk
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

PS C:\Windows\system32> Import-Module hawk Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified. At line:1 char:1

  • Import-Module hawk
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

PS C:\Windows\system32> Import-Module hawk Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified. At line:1 char:1

  • Import-Module hawk
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    

PS C:\Windows\system32> cd C:
PS C:> Import-Module HAWK Import-Module : Could not load file or assembly 'file:///C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.5.1\netFramework\Azure.Core.dll' or one of its dependencies. The system cannot find the file specified. At line:1 char:1

  • Import-Module HAWK
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    

jleroxGWNTC avatar Jul 12 '24 15:07 jleroxGWNTC

Have you tried to downgrade EXO module to 3.4.0? It is a known issue that more up to date versions of EXO cause issues.

Also, you should edit your original post as I believe your company domain name is shown, just so you known.

syne0 avatar Jul 12 '24 19:07 syne0

Have you tried to downgrade EXO module to 3.4.0? It is a known issue that more up to date versions of EXO cause issues.

Also, you should edit your original post as I believe your company domain name is shown, just so you known.

image

Yup this was the issue, deleted 3.5.1 after running Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.4.0

and it started up

Gray-0men avatar Jul 19 '24 04:07 Gray-0men

Updated to new module and it worked. Closing issue.

T0pCyber avatar Nov 27 '24 20:11 T0pCyber