d365collaborative / d365fo.tools

Tools used for Dynamics 365 Finance and Operations
MIT License
250 stars 102 forks source link

Error when installing module #636

Closed shashisadasivan closed 2 years ago

shashisadasivan commented 2 years ago

On a new machine, when installing i get the following error

power shell version: 5.1.17763.2268

PackageManagement\Install-Package : The following commands are already available on this
system:'Login-AzAccount,Logout-AzAccount,Resolve-Error,Send-Feedback'. This module 'AzureRM.profile' may override the
existing commands. If you still want to install this module 'AzureRM.profile', use -AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
   Exception
    + FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.Pack
   ageManagement.Cmdlets.InstallPackage
Splaxi commented 2 years ago

That would indicate the either you have installed some other powershell modules prior this - or that Microsoft has finally updated their base image with newer powershell modules.

Either way - the trick is to do what the error is stating:

Install-Module -Name d365fo.tools -AllowClobber
shashisadasivan commented 2 years ago

Thanks, just found a previous ticket #563

install-module -name d365fo.tools -AllowClobber install-module Az -AllowClobber