]> ###2026-01-28 - PowerShell Version 7.5.4 (https://github.com/PowerShell/PowerShell/releases/tag/v7.5.4) ###2025-09-25 - PowerShell Version 7.5.3 (https://github.com/PowerShell/PowerShell/releases/tag/v7.5.3) ###2025-07-19 - PowerShell Version 7.5.2 (https://github.com/PowerShell/PowerShell/releases/tag/v7.5.2) ###2025-05-17 - PowerShell Version 7.5.1 (https://github.com/PowerShell/PowerShell/releases/tag/v7.5.1) ###Older updates removed ###2023-03-05 - Added Unraid community support URL https://forums.unraid.net/topic/135932-plugin-powershell/ # # Set up variables # checksumverified=false pluginDir=&plugin; pwshVersion=&version; thisSHA256=&sha256; # # Set up variables # pwshDownloadFilename="powershell-${pwshVersion}-linux-x64.tar.gz" pwshDownloadPath="${pluginDir}/${pwshDownloadFilename}" pwshDownloadBase="https://github.com/PowerShell/PowerShell/releases/download/v${pwshVersion}" pwshDownloadURL="${pwshDownloadBase}/${pwshDownloadFilename}" pwshDownloadOutputSHA256="${thisSHA256} ${pwshDownloadPath}" pwshInstallDir="/opt/microsoft/powershell/${pwshVersion}" pwshExecutable="${pwshInstallDir}/pwsh" pwshExecutableBin="/usr/bin/pwsh" echo "Removing Old Install" rm -rf "$pwshExecutableBin" $(dirname "${pwshInstallDir}") find "${pluginDir}" -type f -regex '.*powershell-.*-linux-x64.tar.gz' ! -iname $pwshDownloadFilename -delete echo "Creating Directories (if they don't exist)" mkdir -p "${pwshInstallDir}" "${pluginDir}" if echo "$pwshDownloadOutputSHA256" | sha256sum -c; then echo "Using already downloaded file" checksumverified=true else echo "Need to download PowerShell. Downloading Source $pwshDownloadURL" curl -L -o $pwshDownloadPath $pwshDownloadURL if echo "$pwshDownloadOutputSHA256" | sha256sum -c ; then checksumverified=true ; fi fi if [ $checksumverified == true ] ; then echo "Untar files" tar zxf "${pwshDownloadPath}" -C $pwshInstallDir echo "Set execute permissions" chmod +x $pwshExecutable echo "Create the symbolic link that points to pwsh" ln -s "${pwshExecutable}" "${pwshExecutableBin}" echo "Finished Install" # # Find any powershell scripts that have been added in here and run them # pwshFiles=$(find "/boot/config/plugins/my_startup_scripts" -type f -name '*.ps1' -print | sort) for pwshFile in $pwshFiles; do echo "Running $pwshFile" pwsh "$pwshFile" done else echo "${pwshDownloadPath}" echo "Failed to verify checksum!!!" fi **PowerShell** This Plugin allows you to install Microsoft PowerShell. echo "------------------------------------" echo "---Uninstalling PowerShell plugin---" echo "------------------------------------" echo # Remove plugin related files rm -rf /usr/bin/pwsh /opt/microsoft/powershell rm -rf &plugin; rm -rf &plugdir; echo echo "--------------------------------------------------------" echo "--------------PowerShell uninstalled--------------------" echo "--------------------------------------------------------" echo