You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invoke-RestMethod : Version string portion was too short or too long.
At line:1 char:1
+ Invoke-RestMethod https://api.github.com/users/nightroman/repos
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-RestMethod], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Some info about the inner exception:
PS> $error.Exception.ToString()
System.ArgumentException: Version string portion was too short or too long.
at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument)
at System.Version.TryParseVersion(String version, VersionResult& result)
at System.Version.Parse(String input)
at System.Version..ctor(String version)
at Microsoft.PowerShell.Commands.PSUserAgent.get_PlatformName()
at Microsoft.PowerShell.Commands.PSUserAgent.get_UserAgent()
at Microsoft.PowerShell.Commands.WebRequestSession..ctor()
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.PrepareSession()
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
Environment:
PS> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta.9
PSEdition Core
GitCommitId v6.0.0-beta.9
OS Microsoft Windows 6.1.7601 S
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Problem case:
Expected result:
The command returns the requested data.
Actual result:
The command fails:
Some info about the inner exception:
Environment: