Despite the bad rating on WineHQ I attempted to install Powershell 2.0 using wine 1.7 on Debian Jessie, and after a registry "fix", it runs without the previous startup errors.
I had followed the instruction on the above page, jumped through the winetricks hoops (hoping they are up2date) with lots of errors and installer crashes, and ended up with something that runs, displays as version 2.0, but gave me a screen-full of errors before giving me a prompt.
Those startup errors I "fixed" by replacing
wine regedit. This seems like just fixing a symptom of a "broken" installation, so I wanted to make sure, there wasn't a better solution available. One that keeps the installation up2date too, perhaps? A script for Windows to pull files to create an installable
wine bottle package after each windows update? A "winetricks recipe" adapted for 2015+ for installing PowerShell 2.0 correctly? I'll take anything.
I also face terminal issues (separate question) that disable TAB-completion and introduce hard wrapping.
Here is the output before the registry modification:
$ /usr/lib/wine-development/wine powershell.exe Windows PowerShell Copyright (C) 2009 Microsoft Corporation. All rights reserved. The following error occurred while loading the extended type data file: Cannot find the path "%SystemRoot%\system32\WindowsPowerShell\v1.0" specified in the registry key: "SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell\Path". Using "C:\windows\assembly\GAC_MSIL\System.Management.Automation\220.127.116.11__31bf3856ad364e35" to load the configuration files. Microsoft.PowerShell.Diagnostics, C:\windows\assembly\GAC_MSIL\System.Management.Automation\18.104.22.168__31bf3856ad364e35\%SystemRoot%\system32\WindowsPowerShell\v1.0\GetEvent.types.ps1xml : File not found. Microsoft.PowerShell.Core, C:\windows\assembly\GAC_MSIL\System.Management.Automation\22.214.171.124__31bf3856ad364e35\%SystemRoot%\system32\WindowsPowerShell\v1.0\types.ps1xml : File not found. ... More followup errors ... PS Z:\home\alex> $psversiontable.psversion Major : 2 Minor : 0 Build : -1 Revision : -1 MajorRevision : -1 MinorRevision : -1
I have not tested yet, if all functionality works, since it is a bit tedious without the TAB-completion. Does anybody else run Powershell like this, and can report success/limitations/installation_enhancements?
I have an unused windows pro license lying around, so I consider myself covered wrt licensing. Should I?
Before that comment comes up: The primary purpose of this is to run powershell in one of my tmux tabs to PS-Remote-Session me to Windows machines, the secondary being my interest in the object-oriented shell paradigm, and the library of existing windows management tools available for powershell.