Upload New File
This commit is contained in:
parent
b30c28cc1b
commit
c21c706d3e
40
update_intune.sh
Normal file
40
update_intune.sh
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -f /etc/os-release ]; then
|
||||||
|
# freedesktop.org and systemd
|
||||||
|
. /etc/os-release
|
||||||
|
OS=$NAME
|
||||||
|
VER=$VERSION_ID
|
||||||
|
else
|
||||||
|
OS="none"
|
||||||
|
VER="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! $OS = "Ubuntu" ]; then
|
||||||
|
printf -- '\033[33m Ubuntu not detected\n\033[37m'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $VER = "22.04" ]; then
|
||||||
|
# Install system packages
|
||||||
|
printf -- '\033[33m Installing system packages\n\033[37m'
|
||||||
|
sudo apt update
|
||||||
|
sudo apt upgrade -y
|
||||||
|
sudo apt install -y gpg software-properties-common apt-transport-https curl ca-certificates
|
||||||
|
# Install Microsoft gpg keys
|
||||||
|
printf -- '\033[33m Installing Microsoft gpg keys\n\033[37m'
|
||||||
|
curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg > /dev/null
|
||||||
|
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
||||||
|
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
|
||||||
|
sudo rm microsoft.gpg
|
||||||
|
# Add Microsoft repos
|
||||||
|
printf -- '\033[33m Adding Microsoft repos\n\033[37m'
|
||||||
|
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge.list'
|
||||||
|
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" > /etc/apt/sources.list.d/microsoft-ubuntu-jammy-prod.list'
|
||||||
|
# Install Microsoft apps
|
||||||
|
printf -- '\033[33m Installing Microsoft packages\n\033[37m'
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y microsoft-edge-stable intune-portal microsoft-azurevpnclient mdatp
|
||||||
|
fi
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user