Last active
March 15, 2022 21:47
-
-
Save skyhoshi/49da692889db0503a022b9a538f91500 to your computer and use it in GitHub Desktop.
Configure ServerBased Scoop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy -ExecutionPolicy Unrestricted; | |
powershell.exe -NoLogo -NoProfile -Command 'Install-Module -Name PackageManagement -Force -MinimumVersion 2.8.5.201 -Scope CurrentUser -AllowClobber' | |
$ScoopGlobalRoot = "C:\Applications"; | |
$Installers = "$ScoopGlobalRoot\Installers" | |
$env:SCOOP = "$ScoopGlobalRoot\$env:USERNAME\"; | |
$env:SCOOP_GLOBAL = "$ScoopGlobalRoot\Global"; | |
if (!(Test-Path -Path $env:SCOOP)) { | |
New-Item -ItemType Directory $env:SCOOP; | |
} | |
if (!(Test-Path -Path $env:SCOOP_GLOBAL)) { | |
New-Item -ItemType Directory $env:SCOOP_GLOBAL; | |
} | |
if(!(Test-Path -Path $Installers)){ | |
New-Item -ItemType Directory $Installers; | |
} | |
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User') | |
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine') | |
# run the installer | |
#iwr -useb get.scoop.sh | iex | |
iwr -useb get.scoop.sh -outfile 'install.ps1' | |
.\install.ps1 -RunAsAdmin #[-OtherParameters ...] | |
scoop install 7zip -g | |
scoop install git-with-openssh -g | |
scoop install hub -g | |
Add-MpPreference -ExclusionPath $ScoopGlobalRoot | |
Add-MpPreference -ExclusionPath $Installers | |
Add-MpPreference -ExclusionPath $env:SCOOP | |
Add-MpPreference -ExclusionPath $env:SCOOP_GLOBAL | |
Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1 | |
$(scoop bucket known) | Where-Object {$_ -inotin @("games")}| foreach-object {scoop bucket add $_ } | |
scoop install winrar -g | |
scoop install vsCode -g | |
scoop install jetbrains-toolbox -g | |
scoop install kdiff3 -g | |
scoop install fork -g | |
scoop install ipscan -g | |
scoop instally sysinternals -g | |
#if personal computer install some "Nice to Haves" | |
if ($env:COMPUTERNAME -ccontains "SKY-"){ | |
scoop install foobar2000 -g | |
scoop install keepass -g | |
scoop install doxbox-x -g | |
} | |
# add auto-update bucket | |
scoop bucket add scoop-completion https://github.com/Moeologist/scoop-completion | |
# install | |
scoop install scoop-completion | |
#"Import-Module `"$($(Get-Item $(Get-Command scoop).Path).Directory.Parent.FullName)\modules\scoop-completion`"" >> $profile.AllUsersAllHosts; | |
"Import-Module `"$($env:SCOOP_GLOBAL)\modules\scoop-completion`"" >> $profile.AllUsersAllHosts; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment