-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not loading #8
Comments
The directory structure between the older version and the latest release of dbatool.library is totally different. The older version I only see a folder named 2023.5.5 under the main folder, while the new version has several folders and files listed |
Hi @dennisa72295 - when you download and unzip make sure you match the directory structure in I would expect
also when you download from the internet sometimes the files are blocked - you can unblock them all like this: Get-ChildItem -Path '...My Documents\WindowsPowershell\Modules\dbatools.library\2023.9.21' -Recurse | Unblock-File |
The downloadable zip file for the dbatools.library doesn't have the same directory structure. Meaning that in the previous version when I unzipped it there was a 2023.9.21 folder, however, in the latest version there is no such folder (2024.3.9) in the zip file. The only way I could get a correct module installed was to go to a personal off network PC and install from the internet then copy the installed directories to USB and sneakernet them over to my on network PC. This makes any future upgrades a lot harder to do. |
Where do you download the zip from? PowerShell Gallery? |
Gotcha - so I would suggest writing a PowerShell script to create the folder structure you need.. I'm not sure about how that zip gets generated - I don't believe it's something we can control I'm afraid. |
It should be easy enough to take and installed version and upload it to the GitHub repo for download. What is there seems to be source code that isn't compiled yet. |
Due to security policies I can't use Install-module to install dbatools nor dbatools.library. I downloaded the latest release of both and unzipped them into My Documents\WindowsPowershell\Modules directory. I removed the -master and -main from the folder names.
When I try to import the module dbatools I get and error from the dbatools.library module:
import-module : The specified module 'C:\Users\adm-l2a-deanderson\Documents\WindowsPowerShell\Modules\dbatools.library
desktop\lib\Microsoft.Data.SqlClient.dll' was not loaded because no valid module file was found in any module
directory.
At line:1 char:1
The text was updated successfully, but these errors were encountered: