not able to install modules

Welcome Forums General PowerShell Q&A not able to install modules

Viewing 6 reply threads
  • Author
    Posts
    • #227800
      Participant
      Topics: 44
      Replies: 97
      Points: 605
      Rank: Major Contributor

      Hi,
      when I use powershell 5.1 to install the azureAD module I get the following error

      when running powershell 6 I’m able to install AzureAD but when I check get-module  the AzureAD module is not listed
      when I run get-installedModule -Name AzureAD -Allversions I get this as feedback

      but when I run connect-azureAD (which would normally pops up the authentication windows to enter username password and mfa) this is not happening
      do you have any ideas on how to troubleshoot this?

      Paul

    • #227842
      Participant
      Topics: 9
      Replies: 678
      Points: 2,683
      Helping Hand
      Rank: Community Hero

      Try this, run this in 5.1 and then try to install the module.

    • #227875
      Participant
      Topics: 44
      Replies: 97
      Points: 605
      Rank: Major Contributor

      Doug you rock thanks for this

      can you explain to me what this does exactly

      Best regards

      Paul

      • This reply was modified 6 months, 3 weeks ago by acer460527.
    • #227887
      Participant
      Topics: 9
      Replies: 678
      Points: 2,683
      Helping Hand
      Rank: Community Hero

      They dropped support for TLS 1.0, so you instructed powershell to use 1.2. See this thread.
      Glad I could help.

    • #228067
      Participant
      Topics: 44
      Replies: 97
      Points: 605
      Rank: Major Contributor

      another question
      I’m preparing a script that is going to be shared with a couple of users.
      and they need to have to install the required modules as well.
      is there a way to test what the current security protocol state is?
      this way I can integrate this in my checks that if current security protocol is not equal to
      [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
      to run this?

    • #228079
      Participant
      Topics: 9
      Replies: 678
      Points: 2,683
      Helping Hand
      Rank: Community Hero

      It’s only an issue in 5.1. What’s the harm in adding this to the beginning of each of your scripts just in case? Even if it’s set, it won’t error. However, you could potentially check it like this, but surely there is a better way.

      Or

    • #228088
      Participant
      Topics: 44
      Replies: 97
      Points: 605
      Rank: Major Contributor

      thanks Doug,
      the goal is to create a check.ps where all these things are checked and once a module is installed I don’t require to change the current settings

       

      Paul

       

Viewing 6 reply threads
  • The topic ‘not able to install modules’ is closed to new replies.