I have just tried installing Posh-Git from the PowerShell gallery by copy and pasting this command:
Install-Module -Name posh-git -RequiredVersion 0.7.1
The command seems to run fine, i.e. there is a slight delay, and my PowerShell prompt returns. There are no success or error messages, yet I still don't have the special Posh-Git prompt in Git folders, and the C:\Users\brady\Documents\WindowsPowerShell\Modules
folder is empty, implying no module was installed.
As suggested, using the -verbose
switch gave the following output:
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='posh-git'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'posh-git'.
VERBOSE: Skipping installed module posh-git 0.7.1.
Then checking the $error
variable gave the following output:
Unable to find type [Microsoft.PowerShell.Commands.PowerShellGet.Telemetry].
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:715 char:26
+ ... yMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power...llGet.Telemetry:TypeName) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound
-verbose
option? Did that give you any more information? Did you check$error
manually?verbose
) and install it again (withverbose
)? As you can see by the output, currently it's assuming thatposh-git 0.7.1
is installed. Did you try to search forposh-git
on your system?