Deploy PowerShell 7 via Intune | Win32 Packaging Guide
PowerShell 7 is the cross-platform successor to Windows PowerShell 5.1. It installs side-by-side and provides significant improvements including better error handling, parallel pipeline execution, and modern .NET runtime. This is a very common deployment request from IT teams that want the latest PowerShell features available on managed devices.
PowerShell 7 vs Windows PowerShell 5.1
PowerShell 7 and Windows PowerShell 5.1 are separate products that run side by side:
- Windows PowerShell 5.1 - built into Windows, at C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe. Not updated, remains for compatibility.
- PowerShell 7 - downloaded and installed separately, at C:\Program Files\PowerShell\7\pwsh.exe. Actively developed, latest features.
Download the MSI
Download the latest PowerShell 7 MSI from GitHub:
https://github.com/PowerShell/PowerShell/releases
Download PowerShell-7.x.x-win-x64.msi for 64-bit Windows. Always check for the latest stable release rather than preview builds for managed deployments.
Wrap with the Content Prep Tool
IntuneWinAppUtil.exe -c "C:\AppSource\PowerShell7" -s "PowerShell-7.4.0-win-x64.msi" -o "C:\IntunePackages"
Add the app in Intune
- Upload the .intunewin file
- Name: PowerShell 7
- Publisher: Microsoft Corporation
Install and uninstall commands
Detection rule
Frequently Asked Questions
Use: msiexec /i "PowerShell-7.x.x-win-x64.msi" /quiet /norestart ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1. Download the MSI from GitHub releases at github.com/PowerShell/PowerShell/releases.
No. PowerShell 7 installs side-by-side with Windows PowerShell 5.1. Both can run on the same device. Windows PowerShell 5.1 remains at C:\Windows\System32\WindowsPowerShell and PowerShell 7 installs to C:\Program Files\PowerShell\7.
Use a file detection rule: check for pwsh.exe in C:\Program Files\PowerShell\7. You can also check the version with a PowerShell detection script that reads the ProductVersion of pwsh.exe.
Intune runs scripts using Windows PowerShell 5.1 by default. To use PowerShell 7 in Intune, you can call pwsh.exe directly in your scripts or use a wrapper script. Intune does not natively support PowerShell 7 as the script engine yet.