mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 17:53:58 +08:00
Update windows package names
This commit is contained in:
parent
d2fe36fb41
commit
6bf0ead8d6
12
README.md
12
README.md
@ -27,10 +27,8 @@ You can download and install a PowerShell package for any of the following platf
|
||||
|
||||
| Platform | Downloads | How to Install |
|
||||
| ---------------------------------- | ---------------------- | ----------------------------- |
|
||||
| Windows 10 / Server 2016 (x64) | [.msi][rl-windows10] | [Instructions][in-windows] |
|
||||
| Windows 8.1 / Server 2012 R2 (x64) | [.msi][rl-windows81] | [Instructions][in-windows] |
|
||||
| Windows 7 / Server 2008 R2 (x64) | [.msi][rl-windows7-64] | [Instructions][in-windows] |
|
||||
| Windows 7 (x86) | [.msi][rl-windows7-86] | [Instructions][in-windows] |
|
||||
| Windows (x64) | [.msi][rl-windows-64] | [Instructions][in-windows] |
|
||||
| Windows (x86) | [.msi][rl-windows-86] | [Instructions][in-windows] |
|
||||
| Ubuntu 16.04 | [.deb][rl-ubuntu16] | [Instructions][in-ubuntu16] |
|
||||
| Ubuntu 14.04 | [.deb][rl-ubuntu14] | [Instructions][in-ubuntu14] |
|
||||
| Debian 8 | [.deb][rl-ubuntu14] | [Instructions][in-deb8] |
|
||||
@ -43,10 +41,8 @@ You can download and install a PowerShell package for any of the following platf
|
||||
| Docker | | [Instructions][in-docker] |
|
||||
| Kali Linux | [.deb][rl-ubuntu16] | [Instructions][in-kali]
|
||||
|
||||
[rl-windows10]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win10-win2016-x64.msi
|
||||
[rl-windows81]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win81-win2012r2-x64.msi
|
||||
[rl-windows7-64]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win7-win2008r2-x64.msi
|
||||
[rl-windows7-86]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win7-x86.msi
|
||||
[rl-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win-x64.msi
|
||||
[rl-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win-x86.msi
|
||||
[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/powershell_6.0.0-beta.7-1ubuntu1.16.04.1_amd64.deb
|
||||
[rl-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/powershell_6.0.0-beta.7-1ubuntu1.14.04.1_amd64.deb
|
||||
[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/powershell-6.0.0_beta.7-1.el7.x86_64.rpm
|
||||
|
@ -12,7 +12,7 @@ FROM ${WindowsServerCoreRepo}:$WindowsServerCoreVersion AS installer-env
|
||||
# Arguments for installing powershell, must be defined in the container they are used
|
||||
ARG PS_VERSION=6.0.0-beta.7
|
||||
|
||||
ENV PS_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v$PS_VERSION/PowerShell-$PS_VERSION-win10-win2016-x64.zip
|
||||
ENV PS_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v$PS_VERSION/PowerShell-$PS_VERSION-win-x64.zip
|
||||
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
RUN Invoke-WebRequest $Env:PS_DOWNLOAD_URL -OutFile powershell.zip
|
||||
|
@ -1,7 +1,7 @@
|
||||
# escape=`
|
||||
FROM microsoft/nanoserver:latest
|
||||
|
||||
ARG POWERSHELL_ZIP=https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win10-win2016-x64.zip
|
||||
ARG POWERSHELL_ZIP=https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win-x64.zip
|
||||
ARG POWERSHELL_VERSION=6.0.0-beta.7
|
||||
ARG IMAGE_NAME=microsoft/powershell:nanoserver
|
||||
|
||||
@ -25,7 +25,7 @@ LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" `
|
||||
RUN setx /M PATH "%ProgramFiles%\PowerShell\latest;%PATH%"
|
||||
# Setup PowerShell - Log-to > C:\Docker.log
|
||||
SHELL ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-command"]
|
||||
ADD $POWERSHELL_ZIP /powershell-win10-x64.zip
|
||||
ADD $POWERSHELL_ZIP /powershell-win-x64.zip
|
||||
|
||||
# Install PowerShell package and clean up
|
||||
RUN $ErrorActionPreference='Stop'; `
|
||||
@ -36,7 +36,7 @@ RUN $ErrorActionPreference='Stop'; `
|
||||
$VerInfo = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' ; `
|
||||
('FullBuildString: '+$VerInfo.BuildLabEx) | Write-Output ; `
|
||||
('OperatingSystem: '+$VerInfo.ProductName+' '+$VerInfo.EditionId+' '+$VerInfo.InstallationType) | Write-Output ; `
|
||||
[System.IO.FileInfo]$ZipFile = Get-Item -Path ./powershell-win10-x64.zip ; `
|
||||
[System.IO.FileInfo]$ZipFile = Get-Item -Path ./powershell-win-x64.zip ; `
|
||||
New-Item -Path $Env:ProgramFiles/PowerShell -ItemType Directory -Force | out-null ; `
|
||||
[System.IO.DirectoryInfo]$PsFolder=New-Item -Path $Env:ProgramFiles\PowerShell -ItemType Directory -Force ; `
|
||||
Add-Type -AssemblyName System.IO.Compression.ZipFile ; `
|
||||
|
@ -1,7 +1,7 @@
|
||||
# escape=`
|
||||
FROM microsoft/windowsservercore:latest
|
||||
|
||||
ARG POWERSHELL_MSI=https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win10-win2016-x64.msi
|
||||
ARG POWERSHELL_MSI=https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.7/PowerShell-6.0.0-beta.7-win-x64.msi
|
||||
ARG POWERSHELL_VERSION=6.0.0-beta.7
|
||||
ARG IMAGE_NAME=microsoft/powershell:windowsservercore
|
||||
|
||||
@ -25,7 +25,7 @@ LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" `
|
||||
RUN setx /M PATH "%ProgramFiles%\PowerShell\latest;%PATH%"
|
||||
# Setup PowerShell - Log-to > C:\Docker.log
|
||||
SHELL ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-command"]
|
||||
ADD $POWERSHELL_MSI /PowerShell-win10-x64.msi
|
||||
ADD $POWERSHELL_MSI /PowerShell-win-x64.msi
|
||||
|
||||
# Install PowerShell package and clean up
|
||||
RUN $ErrorActionPreference='Stop'; `
|
||||
@ -36,15 +36,15 @@ RUN $ErrorActionPreference='Stop'; `
|
||||
$VerInfo = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' ; `
|
||||
('FullBuildString: '+$VerInfo.BuildLabEx) | Write-Output ; `
|
||||
('OperatingSystem: '+$VerInfo.ProductName+' '+$VerInfo.EditionId+' '+$VerInfo.InstallationType) | Write-Output ; `
|
||||
[System.IO.FileInfo]$MsiFile = Get-Item -Path ./PowerShell-win10-x64.msi ; `
|
||||
Start-Process -FilePath msiexec.exe -ArgumentList '-qn','-i c:\PowerShell-win10-x64.msi', `
|
||||
'-log c:\PowerShell-win10-x64.msi.log','-norestart' -wait ; `
|
||||
$log=get-content -Path C:\PowerShell-win10-x64.msi.log -Last 10 ; `
|
||||
[System.IO.FileInfo]$MsiFile = Get-Item -Path ./PowerShell-win-x64.msi ; `
|
||||
Start-Process -FilePath msiexec.exe -ArgumentList '-qn','-i c:\PowerShell-win-x64.msi', `
|
||||
'-log c:\PowerShell-win-x64.msi.log','-norestart' -wait ; `
|
||||
$log=get-content -Path C:\PowerShell-win-x64.msi.log -Last 10 ; `
|
||||
if ($log -match 'Installation success or error status: 0') { `
|
||||
Remove-Item -Path $MsiFile ; `
|
||||
$psexe=Get-Item -Path $Env:ProgramFiles\PowerShell\*\powershell.exe ; `
|
||||
New-Item -Type SymbolicLink -Path $Env:ProgramFiles\PowerShell\ -Name latest -Value $psexe.DirectoryName `
|
||||
} else { throw 'Installation failed! See c:\PowerShell-win10-x64.msi.log' } ;
|
||||
} else { throw 'Installation failed! See c:\PowerShell-win-x64.msi.log' } ;
|
||||
|
||||
# Verify New Powershell.exe runs
|
||||
SHELL ["C:\\Program Files\\PowerShell\\latest\\PowerShell.exe", "-command"]
|
||||
|
@ -49,7 +49,7 @@ $session = New-PSSession -ComputerName <Nano Server IP address> -Credential <An
|
||||
* Copy the file to the Nano Server instance
|
||||
|
||||
```powershell
|
||||
Copy-Item <local PS Core download location>\powershell-<version>-win10-win2016-x64.zip c:\ -ToSession $session
|
||||
Copy-Item <local PS Core download location>\powershell-<version>-win-x64.zip c:\ -ToSession $session
|
||||
```
|
||||
|
||||
* Enter the session
|
||||
@ -62,7 +62,7 @@ Enter-PSSession $session
|
||||
|
||||
```powershell
|
||||
# Insert the appropriate version.
|
||||
Expand-Archive -Path C:\powershell-<version>-win10-win2016-x64.zip -DestinationPath "C:\PowerShellCore_<version>"
|
||||
Expand-Archive -Path C:\powershell-<version>-win-x64.zip -DestinationPath "C:\PowerShellCore_<version>"
|
||||
```
|
||||
|
||||
* Follow the instructions to create a remoting endpoint using the [another instance technique](#executed-by-another-instance-of-powershell-on-behalf-of-the-instance-that-it-will-register).
|
||||
|
Loading…
Reference in New Issue
Block a user