PowerShellGet icon indicating copy to clipboard operation
PowerShellGet copied to clipboard

Update PowerShellGet to the latest version is failed with Install-Module PowerShellGet

Open cnukarri77 opened this issue 1 year ago • 2 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

  1. Install the Microsoft Graph PowerShell SDK
  2. Configuring the prerequisites where I am getting the error
  3. image

Expected behavior

I should be able to update the Powershell and finally install the Microsoft Graph SDK

Actual behavior

PS C:\Windows\system32> Install-Module PowerShellGet
Exception calling "GetSteppablePipeline" with "0" argument(s): "The expression after '&' in a pipeline element
produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object."
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\3.0.23\PowerShellGet.psm1:1148 char:13
+             $steppablePipeline = $scriptCmd.GetSteppablePipeline()
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RuntimeException

Error details

PS C:\Windows\system32> Install-Module PowerShellGet
Exception calling "GetSteppablePipeline" with "0" argument(s): "The expression after '&' in a pipeline element
produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object."
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\3.0.23\PowerShellGet.psm1:1148 char:13
+             $steppablePipeline = $scriptCmd.GetSteppablePipeline()
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RuntimeException

Environment data

PS C:\Windows\system32> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      22621  4111

Version

5.1

Visuals

No response

cnukarri77 avatar Sep 26 '24 09:09 cnukarri77

@anamnavi Hi, I am raising this issue which is similar to another issue referred the link: https://github.com/PowerShell/PowerShellGet/issues/58

cnukarri77 avatar Sep 26 '24 09:09 cnukarri77

Was there a resolution to this issue?

I am trying to run "Install-Module -Name PnP.PowerShell" but keep getting error

"Exception calling "GetSteppablePipeline" with "0" argument(s): "The expression after '&' in a pipeline element produced an object that was not valid."

plee-hele avatar Oct 20 '25 18:10 plee-hele