NetSPI / PowerUpSQL

PowerUpSQL: A PowerShell Toolkit for Attacking SQL Server
Other
2.47k stars 462 forks source link

No valid module file was found in any module directory #49

Closed ronnieflip closed 5 years ago

ronnieflip commented 5 years ago

What am I doing wrong. Been at the for two days.

PS > Import-Module PowerUpSQL.psd1
ERROR: Import-Module : The specified module 'PowerUpSQL.psd1' was not loaded because no valid module file was found in any mod
ERROR: ule directory.
ERROR:
ERROR: At line:1 char:14
ERROR: + Import-Module <<<<  PowerUpSQL.psd1
ERROR:     + CategoryInfo          : ResourceUnavailable: (PowerUpSQL.psd1:String) [Import-Module], FileNotFoundException
ERROR:     + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
nullbind commented 5 years ago

From the error it looks like powerupsql.psd1 is not in the directory you’re executing the command from. Have the powerupsql files already been downloaded to that directory?

If not, here are a few other loading options. https://github.com/NetSPI/PowerUpSQL/wiki/Setting-Up-PowerUpSQL

Let me know if that helps,

Scott

ronnieflip commented 5 years ago

From the error it looks like powerupsql.psd1 is not in the directory you’re executing the command from. Have the powerupsql files already been downloaded to that directory?

If not, here are a few other loading options. https://github.com/NetSPI/PowerUpSQL/wiki/Setting-Up-PowerUpSQL

Let me know if that helps,

Scott

It was in the right folder. However I got it working when I pointed to the full path.

This was encountered when using the metasploit powershell module

nullbind commented 5 years ago

Thanks for the follow up and sharing your solution. I’m sure other people will run into the same issue.