Where I work we use both Sharepoint 2013 and Sharepoint Online.
If ever I have to download a spreadsheet from Sharepoint 2013; I have to re-download and reinstall the library just in the process before downloading the Sheet from Sharepoint 2013; it is really slow.
I also hate the fact that we are using Spreadsheets at all because they suck and they are slow; but I work at a business; and business people are ignorant and always think they should use spreadsheets; they never think they should god-forbid learn SQL; they’re too busy making money to learn things I guess.
Maybe someone’s used Install-Module instead of Import-Module in the script?
Impossible to help without seeing the code though. Please share the script and remember to use the </> button to format the code. If you can’t see the button on the toolbar, it will be under the gear icon.