Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better instructions for side-by-side install and Zip install #5836

Closed
shannonjk opened this issue Apr 24, 2020 — with docs.microsoft.com · 3 comments · Fixed by #5837
Closed

Better instructions for side-by-side install and Zip install #5836

shannonjk opened this issue Apr 24, 2020 — with docs.microsoft.com · 3 comments · Fixed by #5837
Labels
area-setup Area - Installer packages and configuration resolution-answered Status - closed by existing documentation

Comments

Copy link

I have upgraded to powershell core 7, however some things such as invoke-ascmd simply do not work in 7, but worked in 6.2.4. I have production workloads that depend on this. I tried to install the Zip of 6.2.4, but your instructions on this page for zip install are nearly non-existent, and you have no documentation anywhere else on this. Please advice how to install 6 and 7 side-by-side with detailed instructions. Running pswh.exe from the extracted zip file has many missing fundamental components like powershellget and packagemanager with no way to add.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@sdwheeler
Copy link
Contributor

sdwheeler commented Apr 24, 2020

This is nothing special required for a ZIP-based installation. The zip file contains all of the same modules and assemblies. Everything works. One caveat, you should Unblock the zip file before extracting it. After extracting it, you may want to add the location to your path (in the proper order) so that the unzipped copy of pwsh.exe is executed rather than the PowerShell 7 version (but this is optional).

As a separate note, you should file an issue with the SQL team for Invoke-ASCmd not working in PowerShell 7.

@sdwheeler sdwheeler added area-setup Area - Installer packages and configuration resolution-answered Status - closed by existing documentation labels Apr 24, 2020
Copy link

shannonjkbmgf commented Apr 24, 2020

There are 2 sentences in this article about installing via Zip. Do we just download and run from there? Do we need to extract the file somewhere special? Extracting a file is not necessarily 'installing' something so this is confusing. There is also nothing in the article about unblocking the zip file. I am sorry, but these instructions are completely abysmal in helping someone doing an install in this fashion. Furthermore, I followed you instructions, and I am still getting the following errors. Closing my ticket and saying "it works" when it is clearly not working for me, is not the most professional strategy. Please update your instructions and check that your things actually work.

PS C:\> install-module -Name SqlServer
install-module : The 'install-module' command was found in the module 'PowerShellGet', but the module could not be loaded. For more information, run 'Import-Module PowerShellGet'.
At line:1 char:1
+ install-module -Name SqlServer
+ ~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (install-module:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

PS C:\> import-module powershellget
import-module : The required module 'PackageManagement' is not loaded. Load the module or remove the module from 'RequiredModules' in the file 'C:\Users\shannonko\Documents\PowerShell\Modules\powershellget\2.2.4.1\powershellget.psd1'.
At line:1 char:1
+ import-module powershellget
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ResourceUnavailable: (C:\Users\shannonko\\u2026\powershellget.psd1:String) [Import-Module], MissingMemberException
+ FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Commands.ImportModuleCommand

@sdwheeler
Copy link
Contributor

sdwheeler commented Apr 24, 2020

The process is very simple. Unblocking a file is normal procedure for anything you download on Windows. But it is a fair point that is could be added to the doc.

  1. Download https://github.com/PowerShell/PowerShell/releases/download/v6.2.4/PowerShell-6.2.4-win-x64.zip
  2. Unblock the zip file - for example: Unblock-File PowerShell-6.2.4-win-x64.zip
  3. Unzip the archive to any folder you want - for example: Expand-Archive .\PowerShell-6.2.4-win-x64.zip -DestinationPath .\ps6
  4. Run pwsh.exe from the destination path location (.\ps6 in this example).

If this does not work in your environment then there is something else wrong in your environment.

sdwheeler added a commit that referenced this issue Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup Area - Installer packages and configuration resolution-answered Status - closed by existing documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants