+++ /dev/null
-echo "Install PowerShell 6.2.0"
-
-if [ ! -d /opt/powershell ]; then
-
-cd /tmp
-wget https://github.com/PowerShell/PowerShell/releases/download/v6.2.0/powershell-6.2.0-linux-arm32.tar.gz
-mkdir /opt/powershell
-tar -xvf ./powershell-6.2.0-linux-arm32.tar.gz -C /opt/powershell
-
-echo "PowerShell is now at /opt/powershell/pswsh"
-echo "Remember to update your path."
-
-fi
-
-ln -s /opt/powershell/pwsh /usr/bin/pwsh
-ls /usr/bin/pwsh -alis
-chmod 755 -R /opt/powershell/pwsh
-rm /opt/powershell/DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY
-
--- /dev/null
+
+## https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#raspbian
+
+
+###################################
+# Prerequisites
+
+# Update package lists
+sudo apt-get update
+
+# Install libunwind8 and libssl1.0
+# Regex is used to ensure that we do not install libssl1.0-dev, as it is a variant that is not required
+sudo apt-get install '^libssl1.0.[0-9]$' libunwind8 -y
+
+###################################
+# Download and extract PowerShell
+
+# Grab the latest tar.gz
+wget https://github.com/PowerShell/PowerShell/releases/download/v7.1.2/powershell-7.1.2-linux-arm32.tar.gz
+
+# Make folder to put powershell
+mkdir /etc/powershell
+
+# Unpack the tar.gz file
+tar -xvf ./powershell-7.1.2-linux-arm32.tar.gz -C /etc/powershell
\ No newline at end of file
-## Setup PowerShell
if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then
- echo "************** Install PowerShell and setup profile"
+ echo "************** Install PowerShell"
sudo apt-get install powershell
- chsh --shell /usr/bin/pwsh
- mkdir -p ~/.config/powershell/
- ln -s ~/dotfiles/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
-fi
+fi
\ No newline at end of file
--- /dev/null
+if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then
+ echo "************** Link PowerShell profile"
+ chsh --shell /usr/bin/pwsh
+ mkdir -p ~/.config/powershell/
+ ln -s ~/dotfiles/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
+fi
\ No newline at end of file