Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions utilities/pipelines/sharedScripts/Set-EnvironmentOnAgent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,19 @@ function Set-EnvironmentOnAgent {
Write-Verbose 'Powershell version:' -Verbose
$PSVersionTable

# # Update the list of packages
# sudo apt-get update
# # Install pre-requisite packages.
# sudo apt-get install -y wget apt-transport-https software-properties-common
# # Download the Microsoft repository GPG keys
# wget -q "https://packages.microsoft.com/config/ubuntu/`$(lsb_release -rs)/packages-microsoft-prod.deb"
# # Register the Microsoft repository GPG keys
# sudo dpkg -i packages-microsoft-prod.deb
# # Update the list of packages after we added packages.microsoft.com
# sudo apt-get update
# # Install PowerShell
# sudo apt-get install -y powershell

###########################
## Install Azure CLI ##
###########################
Expand Down Expand Up @@ -248,21 +261,4 @@ function Set-EnvironmentOnAgent {
}

Write-Verbose ('Install-CustomModule end') -Verbose

#####################################
## TEMP PowerShell installation ##
#####################################

# Update the list of packages
sudo apt-get update
# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common
# Download the Microsoft repository GPG keys
wget -q "https://packages.microsoft.com/config/ubuntu/`$(lsb_release -rs)/packages-microsoft-prod.deb"
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of packages after we added packages.microsoft.com
sudo apt-get update
# Install PowerShell
sudo apt-get install -y powershell
}