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

PowerShell/ScubaGear/RequiredVersions.ps1 old Module Versions #943

Closed
BohrenAn opened this issue Feb 27, 2024 · 3 comments
Closed

PowerShell/ScubaGear/RequiredVersions.ps1 old Module Versions #943

BohrenAn opened this issue Feb 27, 2024 · 3 comments
Labels
public-reported This issue is reported by the public users of the tool.

Comments

@BohrenAn
Copy link

🐛 Summary

In the PowerShell/ScubaGear/RequiredVersions.ps1 are many old Modules

MicrosoftTeams 6.0.0 (Current Version)

    @{
        ModuleName = 'MicrosoftTeams'
        ModuleVersion = [version] '4.9.3'
        MaximumVersion = [version] '5.99.99999'
    },

MaximumVersion = [version] '6.99.99999'

Microsoft.Online.SharePoint.PowerShell 16.0.24614.12000 (Current Version)

    @{
        ModuleName = 'Microsoft.Online.SharePoint.PowerShell' # includes OneDrive
        ModuleVersion = [version] '16.0.0'
        MaximumVersion = [version] '16.0.24322.12000'
    },

MaximumVersion = [version] '16.99.99999'

PnP.PowerShell 2.3.0 (Current Version but requires PowerShell 7)

Update to latest PnP.PowerShell (currently 2.2.0) #517
#517

Can you remove this Module? or update to 2.2.0 at least?

    @{
        ModuleName = 'PnP.PowerShell' # alternate for SharePoint PowerShell
        ModuleVersion = [version] '1.12.0'
        MaximumVersion = [version] '1.99.99999'
    },

Test and update MS Graph PowerShell SDK module - v2.15.0 #930
#930
Microsoft.Graph and Microsoft.Graph.Beta Modules are updated about every two Weeks.
Doesn't make sense to limit it to a specific Version

  @{
        ModuleName = 'Microsoft.Graph.Authentication'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Users'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Groups'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Identity.DirectoryManagement'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Identity.Governance'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Identity.SignIns'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },

MaximumVersion = [version] '2.99.99999'

To reproduce

Steps to reproduce the behavior:

Run SetUp.ps1 (it will install all the required Modules with the current version)
Import-Module .\PowerShell\ScubaGear
You will see the Errors

Expected behavior

Import-Module .\PowerShell\ScubaGear\ does work when installed the current Modules

Any helpful log output or screenshots

Paste the results here:

 Import-Module C:\Users\a.bohren\Downloads\ScubaGear-1.1.1\PowerShell\ScubaGear
Import-Module : No acceptable installed version found for module: MicrosoftTeams
        Required Min Version: 4.9.3 | Max Version: 5.99.99999
        Run Get-InstalledModule to see a list of currently installed modules
        Run SetUp.ps1 or Install-Module MicrosoftTeams -Force -MaximumVersion 5.99.99999 to install the latest
acceptable version of MicrosoftTeams
At line:1 char:1
+ Import-Module C:\Users\a.bohren\Downloads\ScubaGear-1.1.1\PowerShell\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : No acceptable installed version found for module: MicrosoftTeams
        Required Min Version: 4.9.3 | Max Version: 5.99.99999
        Run Get-InstalledModule to see a list of currently installed modules
            Run SetUp.ps1 or Install-Module MicrosoftTeams -Force -MaximumVersion 5.99.99999 to install the latest acc
   eptable version of MicrosoftTeams,Microsoft.PowerShell.Commands.ImportModuleCommand

image

@buidav buidav added the public-reported This issue is reported by the public users of the tool. label Feb 27, 2024
@schrolla
Copy link
Collaborator

@BohrenAn Thank you for your report. I'll try and address each item you bring up here. See responses below.

🐛 Summary

In the PowerShell/ScubaGear/RequiredVersions.ps1 are many old Modules

MicrosoftTeams 6.0.0 (Current Version)

    @{
        ModuleName = 'MicrosoftTeams'
        ModuleVersion = [version] '4.9.3'
        MaximumVersion = [version] '5.99.99999'
    },

MaximumVersion = [version] '6.99.99999'

Noted and a new issue #998 has been created to address this issue.

Microsoft.Online.SharePoint.PowerShell 16.0.24614.12000 (Current Version)

    @{
        ModuleName = 'Microsoft.Online.SharePoint.PowerShell' # includes OneDrive
        ModuleVersion = [version] '16.0.0'
        MaximumVersion = [version] '16.0.24322.12000'
    },

MaximumVersion = [version] '16.99.99999'

Noted and a new issue #999 has been created to address this issue

PnP.PowerShell 2.3.0 (Current Version but requires PowerShell 7)

Update to latest PnP.PowerShell (currently 2.2.0) #517 #517

Can you remove this Module? or update to 2.2.0 at least?

    @{
        ModuleName = 'PnP.PowerShell' # alternate for SharePoint PowerShell
        ModuleVersion = [version] '1.12.0'
        MaximumVersion = [version] '1.99.99999'
    },

ScubaGear uses the Microsoft.Online.SharePoint.PowerShell module for user authenticated access and the PnP.PowerShell module for service principal authenticated access. So we cannot remove the PnP module without impacting the ability to run ScubaGear via service principals at this time. Also, the Microsoft SharePoint module is not yet compatible with PS7, therefore we cannot require PS7 for ScubaGear in order to move to PnP.PowerShell v2.2.0 (or latest). We continue to monitor and evaluate options and updates.

Test and update MS Graph PowerShell SDK module - v2.15.0 #930 #930 Microsoft.Graph and Microsoft.Graph.Beta Modules are updated about every two Weeks. Doesn't make sense to limit it to a specific Version

  @{
        ModuleName = 'Microsoft.Graph.Authentication'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Users'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Groups'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Identity.DirectoryManagement'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Identity.Governance'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },
    @{
        ModuleName = 'Microsoft.Graph.Beta.Identity.SignIns'
        ModuleVersion = [version] '2.0.0'
        MaximumVersion = [version] '2.12.0'
    },

MaximumVersion = [version] '2.99.99999'

To reproduce

The issue noted updated MS Graph to the latest version. Pinning was added due to an issue that prevented ScubaGear from functioning for a time. We will continue to evaluate going forward. For now, new versions will be evaluated for compatibility and included in future releases.

Steps to reproduce the behavior:

Run SetUp.ps1 (it will install all the required Modules with the current version) Import-Module .\PowerShell\ScubaGear You will see the Errors

Expected behavior

Import-Module .\PowerShell\ScubaGear\ does work when installed the current Modules

Any helpful log output or screenshots

Paste the results here:

 Import-Module C:\Users\a.bohren\Downloads\ScubaGear-1.1.1\PowerShell\ScubaGear
Import-Module : No acceptable installed version found for module: MicrosoftTeams
        Required Min Version: 4.9.3 | Max Version: 5.99.99999
        Run Get-InstalledModule to see a list of currently installed modules
        Run SetUp.ps1 or Install-Module MicrosoftTeams -Force -MaximumVersion 5.99.99999 to install the latest
acceptable version of MicrosoftTeams
At line:1 char:1
+ Import-Module C:\Users\a.bohren\Downloads\ScubaGear-1.1.1\PowerShell\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : No acceptable installed version found for module: MicrosoftTeams
        Required Min Version: 4.9.3 | Max Version: 5.99.99999
        Run Get-InstalledModule to see a list of currently installed modules
            Run SetUp.ps1 or Install-Module MicrosoftTeams -Force -MaximumVersion 5.99.99999 to install the latest acc
   eptable version of MicrosoftTeams,Microsoft.PowerShell.Commands.ImportModuleCommand

image

The immediate fix would be to perform the Install-Module with -Force as indicated in the error message. However, I understand that this may be undesirable if you already use the MicrosoftTeams v6.0.0 module for other reasons.
You may also adjust the RequiredVersions.ps1 to up the max version and run that way, but understand that since compatibility has not been determined at this time there's no guarantee that ScubaGear will work as intended with the new version. So, if you opt for this approach carefully consider any Teams results.

@BohrenAn
Copy link
Author

Hi @schrolla
Thank you for your detailed Answer.

You may also adjust the RequiredVersions.ps1 to up the max version and run that way
That's what i did.

It just feels a bit weird, to fix dependencys on a Module that is used for Security Recomendations - while my System is fully up to date with all the PowerShell Modules.

Kind Regards
Andres

@schrolla
Copy link
Collaborator

Hi @schrolla Thank you for your detailed Answer.

You may also adjust the RequiredVersions.ps1 to up the max version and run that way
That's what i did.

It just feels a bit weird, to fix dependencys on a Module that is used for Security Recomendations - while my System is fully up to date with all the PowerShell Modules.

Kind Regards Andres

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

3 participants