GithubHelp home page GithubHelp logo

Not loading required modules about sparrow HOT 9 CLOSED

cisagov avatar cisagov commented on August 17, 2024
Not loading required modules

from sparrow.

Comments (9)

plaintextcity avatar plaintextcity commented on August 17, 2024

I had this problem as well, because I had one of the modules installed but an older version. Updating them in reverse order as below allowed me to get through the module check (if you try to update CloudConnect first, it tries to update MSOnline but not with -allowclobber so it fails).

install-module -name MSOnline -force -allowclobber
install-module -name AzureAD -force -allowclobber
install-module -name cloudconnect -force -allowclobber

from sparrow.

DudeLooksLikeASupportTech avatar DudeLooksLikeASupportTech commented on August 17, 2024

Here's the results of trying to to use the install-module command...

PS C:\scripts> install-module -name MSOnline -force -allowclobber
install-module : The term 'install-module' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1

  • install-module -name MSOnline -force -allowclobber
  •   + CategoryInfo          : ObjectNotFound: (install-module:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

from sparrow.

NoMoreFood avatar NoMoreFood commented on August 17, 2024

@DudeLooksLikeASupportTech What version of PowerShell are you running? $PSVersionTable

from sparrow.

Qualley-MN avatar Qualley-MN commented on August 17, 2024

I had to set TLS 1.2 - https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

from sparrow.

DudeLooksLikeASupportTech avatar DudeLooksLikeASupportTech commented on August 17, 2024

PS C:\scripts> $PSVersionTable

Name Value


PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 6.3.9600.19170
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2

Ran the command below, which seemed to complete just fine...
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Re-ran one of the install-module commands again, and got the below error...
PS C:\scripts> install-module -name MSOnline -force -allowclobber
install-module : The term 'install-module' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1

  • install-module -name MSOnline -force -allowclobber
  •   + CategoryInfo          : ObjectNotFound: (install-module:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

from sparrow.

NoMoreFood avatar NoMoreFood commented on August 17, 2024

Try upgrading: https://www.microsoft.com/en-us/download/details.aspx?id=54616

from sparrow.

DudeLooksLikeASupportTech avatar DudeLooksLikeASupportTech commented on August 17, 2024

Upgraded yesterday before going home, and scheduled a reboot of the server overnight. This morning confirmed that the PSVersion is v5.1.

Ran the command below in an admin-level PS shell, and got the included output...
_PS C:\scripts> install-module -name MSOnline -force

NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet
provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\netfrank.KISH\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by
running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install
and import the NuGet provider now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):
WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''.
WARNING: Unable to download the list of available providers. Check your internet connection.
PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider
'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package
has the tags.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7405 char:21_

I put the failed url into a web browser (https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409) , and it seemed to retrieve it just fine...

<!--
    This swidtag is a Discovery Feed that has pointers to the SWIDTAGs for
    the providers that the bootstrapper can download.
-->

 <Link href="https://onegetcdn.azureedge.net/providers/nuget-2.8.5.208.package.swidtag" type="application/swid-tag+xml" rel="package" discovery:name="nuget" discovery:latest="true" discovery:version="2.8.5.208" media="(OS:windows)" />
<Link href="https://onegetcdn.azureedge.net/providers/ChocolateyPrototype-2.8.5.130.package.swidtag" type="application/swid-tag+xml" rel="package" discovery:name="chocolatey" discovery:latest="true" discovery:version="2.8.5.130" media="(OS:windows)" />

<Link href="https://onegetcdn.azureedge.net/providers/nugetv2.feed.swidtag" type="application/swid-tag+xml" rel="feed" discovery:name="nuget" media="(OS:windows)" />

<Link href="https://onegetcdn.azureedge.net/providers/psl.feed.swidtag" type="application/swid-tag+xml" rel="feed" discovery:name="nuget" media="(OS:windows)" />

<Link href="https://onegetcdn.azureedge.net/providers/chocolateyprototype.feed.swidtag" type="application/swid-tag+xml" rel="feed" discovery:name="chocolatey" media="(OS:windows)" />

from sparrow.

DeemOnSecurity avatar DeemOnSecurity commented on August 17, 2024

Give this a shot. Based on my googling it appears this is a TLS issue: https://stackoverflow.com/a/61246161

from sparrow.

DudeLooksLikeASupportTech avatar DudeLooksLikeASupportTech commented on August 17, 2024

Yeah, sorry, I found that myself shortly before your answer. I reran the command below, which made everything start working...
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Thanks for the help everyone. Every time I have to deal with powershell I remember why no one does it unless they have to. It always ends in having to fix 15 other problems just to get one script to run.

from sparrow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.