Skip to main content
    All apps
    Runtimes
    MSI
    Verified recipe

    PowerShell 7 Silent Install Switches (Intune & SCCM)

    Silent install switches

    /quiet /norestart ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1

    Silent uninstall switches: /quiet /norestart

    Intune Win32 app settings

    Paste these into the Program and Detection rules steps when you add PowerShell 7 as a Win32 app.

    Install command
    msiexec /i PowerShell-7.x.x-win-x64.msi /quiet /norestart ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_PATH=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1
    Uninstall command
    msiexec /x {PWSH_GUID} /quiet /norestart
    Detection rule (File)
    C:\Program Files\PowerShell\7\pwsh.exe
    • Device restart behavior: no restart required.

    SCCM / ConfigMgr deployment type

    Installation program
    msiexec /i PowerShell-7.x.x-win-x64.msi /quiet /norestart ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_PATH=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1
    Uninstall program
    msiexec /x {PWSH_GUID} /quiet /norestart

    Values in braces (for example a product GUID) depend on the exact version you deploy. Swap in the value from your installer, or let InstallMage read it for you.

    Deployment notes

    Installs side-by-side with Windows PowerShell 5.1. Enable remoting and context menu.

    Windows Installer packages install silently with msiexec /i <file>.msi /qn (or /quiet) and uninstall with msiexec /x {ProductCode} /qn.

    Package PowerShell 7 as .intunewin in under 3 minutes

    Drop in the PowerShell 7 installer and InstallMage detects the switches, builds the MSI or .intunewin, and generates the install, uninstall and detection commands for you. Free plan, no credit card.

    FAQ

    What are the silent install switches for PowerShell 7?
    PowerShell 7 installs silently with /quiet /norestart ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1 (it uses a MSI installer). Full command: msiexec /i PowerShell-7.x.x-win-x64.msi /quiet /norestart ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_PATH=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1
    How do I silently uninstall PowerShell 7?
    Run: msiexec /x {PWSH_GUID} /quiet /norestart
    What detection rule should I use for PowerShell 7 in Intune?
    Use a file detection rule. File exists: C:\Program Files\PowerShell\7\pwsh.exe.
    How do I deploy PowerShell 7 with Intune?
    Wrap the installer as a Win32 app (.intunewin), set the install and uninstall commands above, and add the detection rule. InstallMage can build the .intunewin and generate these commands from the PowerShell 7 installer in under three minutes.

    More Runtimes silent install switches