Windows 7 WMF 5.0 Prod preview Powershell get not working

This topic contains 2 replies, has 2 voices, and was last updated by  Alexis Coles 2 years, 3 months ago.

  • Author
    Posts
  • #29878

    Alexis Coles
    Participant

    Hi guys,

    I wish I could give you some better information about this, but here goes.

    I am having problems getting powershellget to work properly on my windows 7 box. As soon as I try to use any of it it just refuses to do anything and I can do no more.

    For example I start off with a Get-Module -ListAvailable which give me the following:

    PS Z:\> Get-Module -ListAvailable
    
    
        Directory: C:\Program Files\WindowsPowerShell\Modules
    
    
    ModuleType Version    Name                                ExportedCommands                                                                                
    ---------- -------    ----                                ----------------                                                                                
    Binary     1.0.0.0    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}                          
    Script     1.0        PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...} 
    

    So it seems to be there ready to go, so I follow up with a import-module on it and get the following

    PS Z:\> Import-Module PowerShellGet -Verbose
    VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PowerShellGet.psd1'.
    VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.Format.ps1xml'.
    VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1'.
    VERBOSE: Importing function 'Find-Module'.
    VERBOSE: Importing function 'Get-InstalledModule'.
    VERBOSE: Importing function 'Get-PSRepository'.
    VERBOSE: Importing function 'Install-Module'.
    VERBOSE: Importing function 'Publish-Module'.
    VERBOSE: Importing function 'Register-PSRepository'.
    VERBOSE: Importing function 'Save-Module'.
    VERBOSE: Importing function 'Set-PSRepository'.
    VERBOSE: Importing function 'Uninstall-Module'.
    VERBOSE: Importing function 'Unregister-PSRepository'.
    VERBOSE: Importing function 'Update-Module'.
    VERBOSE: Importing alias 'fimo'.
    VERBOSE: Importing alias 'inmo'.
    VERBOSE: Importing alias 'pumo'.
    VERBOSE: Importing alias 'upmo'.
    

    However now my powershell session is totally broken, auto-complete will not work anymore if I type Get-He *tab* it does not auto complete, if I do a Get-Module *return* nothing happens, the cursor is still there and I can continue to type, but it will not execute the command. If I hit Ctrl+C it will delete what I have typed but then if I type it again it will still do nothing. So need to close down powershell ise and open a new instance to get it working again.

    So now we have our new ise I can try Find-Module *DSC* now the cursor moves onto the next line and it looks like it is working. However it just hangs like that for ever and does not complete. I can hit Ctrl+c to get back control and maybe I can execute a command again after that maybe not, possibly depends on how long I leave the Find-Module command running. If I can't I need to close and open a new ise just like before.

    Running the Find-Module command with -Verbose provides no output. 🙁

    Not really sure what I can do to find out what is going on with it.

    There are a bunch of warning in the Applications and Services\Microsoft\Windows\Powershell\Operational event log when I do import-package PowershellGet or Find-Module: EventId:4104 TaskCategory: Execute a remote command but this does not seem to point to an error.

  • #29892

    Don Jones
    Keymaster

    I've not tested on Win7, but the correct procedure would be to stand up a fresh Win7 VM to test on. If you can duplicate the results, bug it on Connect.

  • #29924

    Alexis Coles
    Participant

    I have now tested this on a fresh install of windows 7 and it works fine. Obviously something to do with my box. I do remember when I ran Find-Module for the first time on my Win 7 machine I was expecting to be prompted to install nuget-anycpu.exe like I was prompted on the server box I was testing previously. I quite distinctly remember this didn't happen. I ended up coping nuget-anycpu.exe to $env:ProgramFiles\PackageManagement\ProviderAssemblies in the hope that would work. When I ran it on the fresh windows 7 machine I was prompted to install it as expected.

    I really hope I don't have to do a reinstall on my development machine in order to get this working :/ Does anyone know what powershellGet depends on? I have tried uninstalling and re-installing WMF 5.0 to no avail.

You must be logged in to reply to this topic.