Skip to content

[Bug]: with import-module command #124

Open
@sebfun

Description

What happened?
Can't execute import-module command. Receiving error ("unable to find a module file")

How to reproduce it
Steps to reproduce the behavior:

  1. PS C:\WINDOWS\system32> Get-ChildItem -Recurse c:\audit\M365 | Unblock-File
    OK no error

PS C:\WINDOWS\system32> Import-Module monkey365
Import-Module : Le module « monkey365 » spécifié n'a pas été chargé, car aucun fichier de module valide n'a été trouvé dans un répertoire de module.
Au caractère Ligne:1 : 1
+ Import-Module monkey365
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (monkey365:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
  1. Trying to move to the right directory
    PS C:\WINDOWS\system32> cd C:\audit\M365
    OK

  2. Retrying import command with -Force

PS C:\audit\M365> Import-Module C:\audit\M365 -Force

Import-Module : Le module « C:\audit\M365 » spécifié n'a pas été chargé, car aucun fichier de module valide n'a été trouvé dans un répertoire de module.
Au caractère Ligne:1 : 1
+ Import-Module C:\audit\M365 -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (C:\audit\M365:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
  1. Listing *.ps1 files in the current directory with dos command :
PS C:\audit\M365> dir *.ps*


Mode                 LastWriteTime         Length Name                                                                                                                                                                                                           
----                 -------------         ------ ----                                                                                                                                                                                                           
------        13/11/2024     13:36           2571 build.ps1                                                                                                                                                                                                      
------        13/11/2024     13:36          27204 Invoke-Monkey365.ps1                                                                                                                                                                                           
------        13/11/2024     13:36            718 monkey365.ps1                                                                                                                                                                                                  
------        13/11/2024     13:36           5097 monkey365.psd1                                                                                                                                                                                                 
------        13/11/2024     13:36           3235 monkey365.psm1     
  1. I also try using backslash at the end of the directory (in the import module command), same result

Expected behavior
Well, I expect to successfully run the import module command

Screenshots or Logs
Not Applicable

From where are you running Monkey365?
Please, complete the following information:

  • Resource: workstation
  • OS: Windows 11 Pro (10.0.26100 Build 26100)
  • PowerShell Version [$PsVersionTable]:
 Name                           Value                                                                                                                                                                                                                             
----                           -----                                                                                                                                                                                                                             
PSVersion                      5.1.26100.2161                                                                                                                                                                                                                    
PSEdition                      Desktop                                                                                                                                                                                                                           
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                                                           
BuildVersion                   10.0.26100.2161                                                                                                                                                                                                                   
CLRVersion                     4.0.30319.42000                                                                                                                                                                                                                   
WSManStackVersion              3.0                                                                                                                                                                                                                               
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                                               
SerializationVersion           1.1.0.1    
  • Monkey365 Version: v0.93-beta

Additional context
Nothing else

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsnot a bugNot a bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions