Skip to content
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

Run SetUp.ps1 and it tells it installs modules but it doesn't #923

Closed
worldsdream opened this issue Feb 20, 2024 · 11 comments
Closed

Run SetUp.ps1 and it tells it installs modules but it doesn't #923

worldsdream opened this issue Feb 20, 2024 · 11 comments
Labels
public-reported This issue is reported by the public users of the tool.

Comments

@worldsdream
Copy link

worldsdream commented Feb 20, 2024

🐛 Summary

To reproduce

Run the SetUp.ps1, and it shows:

image1

When going to the Windows PowerShell modules folder > all modules are installed.

Expected behavior

It should install the modules, and show the module version in the output.

Any helpful log output or screenshots

PowerShell 5.1
Unrestricted execution policy

info

@schrolla
Copy link
Collaborator

Thank you for your report.

When you first ran '\Setup.ps1 on your system, did you already have some or all of the modules from a previous ScubaGear installation?
Since the hotfix pins the Microsoft.Graph.* and Microsoft.Online.SharePoint.PowerShell modules to max versions before latest, the setup script may incorrectly detect that latest is installed if the previous modules are not uninstalled prior to setup. If this is what happened in your case, I'd recommend uninstalling the offending module(s) either manually via Uninstall-Module or with the utils\uninstall-modules.ps1 script provided. Then verify the modules have been removed, and then running .\Setup.ps1 again.

If the problem continues, please let us know.

@gdasher gdasher added the public-reported This issue is reported by the public users of the tool. label Feb 20, 2024
@worldsdream
Copy link
Author

No, I haven't used SCRUBA on the system before (Windows Server 2022). I only had the Exchange Online module installed manually.

I did what you said, and it's not working.

I used it on another system, and it works fine. It looks like it's a problem on my system or so. But then again, the setup.ps1 isn't completely giving correct information as it should.

We can close this, I don't mind. But if someone else gets the same problem, let us know in the comments.

Thanks @schrolla.

@crutchfield
Copy link
Contributor

Perhaps we can have a conversation about developing a pre-check to look for issues users encounter based on known issues.

@schrolla
Copy link
Collaborator

No, I haven't used SCRUBA on the system before (Windows Server 2022). I only had the Exchange Online module installed manually.

I did what you said, and it's not working.

I used it on another system, and it works fine. It looks like it's a problem on my system or so. But then again, the setup.ps1 isn't completely giving correct information as it should.

We can close this, I don't mind. But if someone else gets the same problem, let us know in the comments.

Thanks @schrolla.

Appreciate the follow-up notice. Looking more closely at your screenshot, and wording I see what you mean about not seeing the installed versions in the output. Here's what I see on a functional install on my WIndows 10 test system, for example.

Notice that the version of the installed module is listed next to each. So, perhaps, the query to get the module version on your box isn't working for some reason (might be a Server 2022 compatibility issue). We will have to investigate that further.

Screenshot 2024-02-22 at 11 09 16 AM

My recommendation for you, in this case, would be to uninstall the SharePoint module present, and reinstall the required module version manually like so. That should allow ScubaGear to run as long as the correct version is present even if the Setup.ps1 script isn't installing that version automatically.

Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell
Install-Module -Name Microsoft.Online.SharePoint.PowerShell -RequiredVersion 16.0.24322.12000

@worldsdream
Copy link
Author

worldsdream commented Feb 23, 2024

@schrolla Thanks for the explanation.

It works on another Windows Server 2022 (so that should not be the problem).

I installed the modules manually and that worked. For me, that's okay. But it would have been nice to force the download/installation. Why am I able to manually install it and not through the script...

@wingcomm
Copy link

wingcomm commented Feb 28, 2024

This seems to be a bug in PowerShell with the Sharepoint Module. None of the suggested workarounds here or that I have found elsewhere found seem to resolve this issue. I'm seeing it on all of my systems where I have PowerShell 7 installed and it seems to interfere with the native version/installation of PowerShell.

@schrolla
Copy link
Collaborator

@wingcomm Thatnks for the additional information. The co-location of PS7 is something new to consider and I'll have to install it on a test system and see if that allows us to reproduce this particular bug.

@wingcomm
Copy link

wingcomm commented Feb 29, 2024

@schrolla I cloned a new Base Windows 10 VM without install PowerShell 7 and its running fine. So it seems like a co-located PowerShell 7 breaks things.

We're getting some other errors, I'll open a separate issue.

@schrolla
Copy link
Collaborator

@worldsdream We noticed this issue on one of our runner tasks, and the solution was a small change to the way we calculated our module path in the setup code. The next release will include PR #969 which should address this issue.

@icnee
Copy link

icnee commented Jul 30, 2024

i have just downloaded the file and i am using it for the first time but the file of setup.ps1 is missing can anyone help me out with this ?

@schrolla
Copy link
Collaborator

@icnee This issue was closed and the project has changed significant over the last few releases. I'd recommend making sure that you are using the latest version (which no longer uses setup.ps1). Check out the latest documentation and installation notes here: https://cisagov.github.io/ScubaGear/. In particular, the Getting Started section should provide more details on how to obtain and install the latest ScubaGear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
public-reported This issue is reported by the public users of the tool.
Projects
None yet
Development

No branches or pull requests

6 participants