P.Shell 7 “Get-Package” returns NOTHING. P.Shell 5 RETURNS on same computer!!!

Welcome Forums General PowerShell Q&A P.Shell 7 “Get-Package” returns NOTHING. P.Shell 5 RETURNS on same computer!!!

Viewing 5 reply threads
  • Author
    Posts
    • #222996
      Participant
      Topics: 6
      Replies: 5
      Points: 82
      Rank: Member

      I have many packages on my lap top. I have preinstalled PS 5 and installed PS 7. I install many software packages using the scripts in PS 7. If I run Get-Package command in PowerShell version 7 I am not getting anything as output

      PS C:\Windows\System32> Get-Package
      PS C:\Windows\System32>

      If I run the same command in PowerShell 5 on the same computer I am getting many results:

      PS C:\windows\system32> Get-Package

      Name Version Source ProviderName
      —- ——- —— ————

      Git version 2.9.0 2.9.0 Programs
      Microsoft SQL Server 2017 (… Programs
      Microsoft SQL Server 2019 (… Programs
      Office 16 Click-to-Run Exte… 16.0.11929.20606 msi
      …………

      How is this possible??? Get-Command is the Windows command which should return result in any case. Please help, Thanks in advance!!!

    • #223008
      Participant
      Topics: 6
      Replies: 93
      Points: 428
      Helping Hand
      Rank: Contributor

      I was under the impression that starting with PS V6, they went Open Source which should only show what is supported on all open source platforms of which MS SQL would not be. Again, this was my understanding, I could be wrong.

    • #223011
      Participant
      Topics: 6
      Replies: 5
      Points: 82
      Rank: Member

      Tony,

      thanks for your efforts to reply on this. Did you read something about this, do you have maybe some link so I could see? I searched through the internet and I could not find any reason why I cannot retrieve the list of packages using the “Get-Package”. Does it have sense to you for them to completely change the logic of such an important¬† command?

      Also any additional help from others is highly appreciated.

      I am still very very confused that I am not getting anything in PS 7, while in PS5 I think I have more than 100 results of different products…

       

    • #223023
      Participant
      Topics: 6
      Replies: 93
      Points: 428
      Helping Hand
      Rank: Contributor

      I ready something on line a while back. Have a look at this. Again, I have no conclusive evidence, it just seemed to make sense that one would only support the same objects across all platforms, of which MS SQL would not be one of them. Read this, see if you conclude the same?

       

      https://www.techrepublic.com/article/a-tale-of-two-powershells-which-is-the-right-version-for-you/

       

    • #223110
      js
      Participant
      Topics: 29
      Replies: 814
      Points: 2,456
      Helping Hand
      Rank: Community Hero

      Powershell 7 doesn’t support msi or programs packages.

    • #223173
      Participant
      Topics: 6
      Replies: 5
      Points: 82
      Rank: Member

      Thank you all for your kind answers!

Viewing 5 reply threads
  • You must be logged in to reply to this topic.