Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

windows install chocolatey

# Run Powrshell as admin

Copy Paste this

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Comment

how to install chocolatey on windows 10

# COPY AND PASTE THIS COMMAND 

# using cmd as admin
@"%SystemRoot%System32WindowsPowerShellv1.0powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%chocolateyin"

#or

#using powershell as admin
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Comment

chocolatey installation

@"%SystemRoot%System32WindowsPowerShellv1.0powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command " [System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%chocolateyin"
Comment

install chocolatey

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Comment

install chocolatey on windows

@"%SystemRoot%System32WindowsPowerShellv1.0powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%chocolateyin"
Comment

chocolatey install

#Install Chocolatey
#region
echo "Setting up Chocolatey software package manager"
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT

Get-PackageProvider -Name chocolatey -Force

echo "Setting up Full Chocolatey Install"
Install-Package -Name Chocolatey -Force -ProviderName chocolatey
$chocopath = (Get-Package chocolatey | 
            ?{$_.Name -eq "chocolatey"} | 
                Select @{N="Source";E={((($a=($_.Source -split ""))[0..($a.length - 2)]) -join ""),"ToolschocolateyInstall" -join ""}} | 
                    Select -ExpandProperty Source)
& $chocopath "upgrade all -y"
choco install chocolatey-core.extension --force

echo "Creating daily task to automatically upgrade Chocolatey packages"
# adapted from https://blogs.technet.microsoft.com/heyscriptingguy/2013/11/23/using-scheduled-tasks-and-scheduled-jobs-in-powershell/
$ScheduledJob = @{
    Name = "Chocolatey Daily Upgrade"
    ScriptBlock = {choco upgrade all -y}
    Trigger = New-JobTrigger -Daily -at 2am
    ScheduledJobOption = New-ScheduledJobOption -RunElevated -MultipleInstancePolicy StopExisting -RequireNetwork
}
Register-ScheduledJob @ScheduledJob
#endregion

#Update Powershell
#region
$ErrorActionPreference = "silentlycontinue"

$PSVersionTable.PSVersion
choco install powershell -y
choco upgrade powershell -y

$ErrorActionPreference = "continue"
#endregion
Comment

PREVIOUS NEXT
Code Example
Shell :: install kivy 
Shell :: linux check if using wayland or x11 
Shell :: zip some files linux 
Shell :: find tomcat location in mac 
Shell :: linux move everything in a directory to another directory 
Shell :: docker /bin/sh: apt-get: not found 
Shell :: linux how to free memory 
Shell :: What is the difference between git push origin and git push origin master 
Shell :: stremio: Depends: libfdk-aac1 
Shell :: conda install cython 
Shell :: conda install pytorch 
Shell :: gcloud scp 
Shell :: open path using terminal ubuntu 
Shell :: are github and git same thing 
Shell :: Error: `@cucumber/cucumber` module not resolvable. Must be locally installed. 
Shell :: testing cors 
Shell :: bash split and get last 
Shell :: how to install mongoose globally 
Shell :: wget install windows cmd 
Shell :: crontab save 
Shell :: pyinstaller exe version info 
Shell :: git clone latest commit 
Shell :: generate certificate 
Shell :: how to list all versions of pip in ubuntu using grep 
Shell :: INSTALL VMwareTools on terminal ap=get 
Shell :: another apache web server is running 
Shell :: how to remove stuff from git 
Shell :: discard all changes 
Shell :: laravel install by composer 
Shell :: install kde partition manager 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =