PowerGit
PowerGit copied to clipboard
All commands returns 'the module could not be loaded' in PoSH 5.1
PS C:\> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 18362 752
PS C:\> Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, ServicePackMajorVersion, OSArchitecture, WindowsDirectory
Caption : Microsoft Windows 10 Enterprise
Version : 10.0.18363
ServicePackMajorVersion : 0
OSArchitecture : 64-bit
WindowsDirectory : C:\Windows
PS C:\> Get-Module -Name PowerGit -ListAvailable
Directory: C:\Users\XXXXX\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 0.7.1 PowerGit {Add-GitItem, Add-GitRemote, Clear-GitRepositoryCache, Com...
After installing the module, any command used returns an error.
Get-GitStatus
Get-GitStatus : The 'Get-GitStatus' command was found in the module 'PowerGit', but the module could not be loaded.
For more information, run 'Import-Module PowerGit'.
At line:1 char:1
+ Get-GitStatus
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-GitStatus:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
The suggested action results in
Import-Module PowerGit
You cannot call a method on a null-valued expression.
At C:\Users\XXXXX\Documents\WindowsPowerShell\Modules\PowerGit\0.7.1\PowerGit.psm1:19 char:9
+ $arch = [RuntimeInformation]::OSArchitecture.ToString().ToLow ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Copy-Item : Cannot find path
'C:\Users\XXXXX\Documents\WindowsPowerShell\Modules\PowerGit\0.7.1\Assemblies\win-\native' because it does not exist.
At C:\Users\XXXXX\Documents\WindowsPowerShell\Modules\PowerGit\0.7.1\PowerGit.psm1:40 char:5
+ Copy-Item "$PSScriptRoot/Assemblies/$runtime/native/*.*" "$PSScri ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\XXXXX...ies\win-\native:String) [Copy-Item], ItemNotFoundExce
ption
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand
Import-Module : The module to process 'PowerGit.psm1', listed in field 'ModuleToProcess/RootModule' of module manifest
'C:\Users\XXXXX\Documents\WindowsPowerShell\Modules\PowerGit\0.7.1\PowerGit.psd1' was not processed because no valid
module was found in any module directory.
At line:1 char:1
+ Import-Module PowerGit
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (PowerGit:String) [Import-Module], PSInvalidOperationException
+ FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Hey @dennisl68-castra, sorry for the trouble. The module only works on PowerShell 6 and higher (I should make this more clear). Are you blocked from upgrading?
Hi @felixfbecker,
Yes, I'm stuck with a corporate PC at a client site and can't upgrade it.