I cannot install ExchangeOnlineManagement -RequiredVersion 2.0.6-preview4

Virtual Tech 106 Reputation points
2022-07-05T14:08:41.063+00:00

Please help. Any ideas why this happens.

PS C:\programdata\microsoft\windows> Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.6-preview4 -AllowPrerelease
Install-Module : Cannot process argument transformation on parameter 'RequiredVersion'. Cannot convert value "2.0.6-preview4" to type "System.Version". Error: "Input string was not in a
correct format."
At line:1 char:64

  • ... Name ExchangeOnlineManagement -RequiredVersion 2.0.6-preview4 -AllowP ...
  • ~~~~~~~~~~~~~~
  • CategoryInfo : InvalidData: (:) [Install-Module], ParameterBindingArgumentTransformationException
  • FullyQualifiedErrorId : ParameterArgumentTransformationError,Install-Module

217704-capture.png

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,190 questions
Windows for business | Windows Server | User experience | PowerShell
{count} votes

Accepted answer
  1. Vasil Michev 119.8K Reputation points MVP Volunteer Moderator
    2022-07-05T14:15:12.187+00:00

    Update your PowerShellGet module version first, as you are likely using an older version.

    Install-Module PowerShellGet -Force  
    

    Once updated, restart PowerShell and try again. Also, use 2.0.6-preview6 as that's the latest available version of the ExchangeOnlineManagement module.

    Install-Module -Name ExchangeOnlineManagement -RequiredVersion "2.0.6-preview6" -AllowPrerelease  
    
    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Virtual Tech 106 Reputation points
    2022-07-07T14:43:06.893+00:00

    The steps fixed my issue. Thank you

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.