mirror of
https://github.com/KiTTYsh/dotfiles.git
synced 2025-12-09 20:59:16 -05:00
initenv: install pscore using winget
This commit is contained in:
@@ -7,12 +7,9 @@ if (!(Get-Module -ListAvailable -Name Microsoft.WinGet.Client)) {
|
|||||||
# Get installed applications so that we can identify what needs to be installed
|
# Get installed applications so that we can identify what needs to be installed
|
||||||
$InstalledApplications = Get-WmiObject -Class Win32_Product
|
$InstalledApplications = Get-WmiObject -Class Win32_Product
|
||||||
|
|
||||||
# PowerShell 7
|
# Install PowerShell Core
|
||||||
if (-not ($InstalledApplications | where Name -EQ "PowerShell 7-x64")) {
|
if (!(Get-WinGetPackage -Source "winget" -MatchOption "Equals" -Id "Microsoft.PowerShell")) {
|
||||||
echo "Installing PowerShell 7"
|
Install-WinGetPackage -Source "winget" -MatchOption "Equals" -Id "Microsoft.PowerShell" -Override "/passive ENABLE_PSREMOTING=1 ADD_PATH=1"
|
||||||
cd "$env:USERPROFILE\Downloads"
|
|
||||||
Invoke-WebRequest -Uri 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.6/PowerShell-7.3.6-win-x64.msi' -OutFile powershell.msi
|
|
||||||
msiexec.exe /package powershell.msi /quiet ENABLE_PSREMOTING=1 ADD_PATH=1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Vim90
|
# Vim90
|
||||||
|
|||||||
Reference in New Issue
Block a user