During application deployment in Configuration Manager (ConfigMgr/SCCM), you may encounter the error 0x87d01106 – Failed to verify the executable file is valid or to construct the associated command line. This issue is commonly logged in AppEnforce.log and occurs when the deployment tries to run a PowerShell script but cannot locate PowerShell.exe. The root cause is typically a missing or misconfigured PATH environment variable, which prevents the client from resolving the PowerShell executable. In this guide, we’ll explain the error details, its cause, and the recommended fix — using the full path to PowerShell.exe in the deployment command line.
Deployment Error
While monitoring the application deployment through SCCM reports, the following error was logged across multiple devices:
Error description: Failed to verify the executable file is valid or to construct the associated command line

Further investigation on the client machine revealed the following error entries in the AppEnforce.log file.
Error in C:\Windows\ccm\logs\AppEnforce.log File :
Context: Machine
Command line: Powershell.exe -ExecutionPolicy ByPass -File MyScript.ps1
Allow user interaction: No
UI mode: 0
User token: null
Session Id: 4294967295
Content path: C:\WINDOWS\ccmcache\3
Working directory:
Invalid executable file Powershell.exe
AppProvider::EnforceApp – Failed to invoke EnforceApp on Application handler ( 0x87d01106 ).

Cause for Error 0x87d01106
The application attempted to execute a PowerShell script, but PowerShell.exe could not be located on the client computers. This occurred because the full path to PowerShell.exe was not specified in the deployment command line, leaving the process dependent on the PATH environment variable, which was either missing or misconfigured.
powershell.exe -ExecutionPolicy ByPass -File MyScript.ps1
The PowerShell.exe path must be defined in the PATH environment variable. By default, Windows includes this path automatically. However, it may be overwritten or removed by other applications due to misconfiguration. As a result, SCCM deployments that rely on PowerShell will fail on computers where the PowerShell.exe path is missing from the PATH variable.

Solution for Error 0x87d01106
It is best practice to provide the complete path to the PowerShell executable in the program command line. This eliminates dependency on the PATH environment variable, ensuring that PowerShell.exe can always be located using the explicit path provided.
The full command line to execute a PowerShell script should look like this:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File MyScript.ps1

Quick Fix Checklist:
- ✅ Verify AppEnforce.log for error 0x87d01106
- ✅ Check PATH environment variable for PowerShell.exe
- ✅ Update deployment command line with full path
- ✅ Redeploy application
Related Posts:
- SCCM Application Deployment Failed with Error 0x87d01106 | ConfigMgr
- SCCM Client Installation Failed With Error Code 0x87d00215
- PXE-E99: Unexpected network error – SCCM OSD
- Configuration Manager OSD task sequence fails with error code 0x80004005
- MECM OSD Task Sequence Failed with Error 0x80072EE7
- SCCM Client Push Installation Failed with Error 0x800706ba
- Failed to Add Update Source for WUAgent of type (2) and id ({ID). Error = 0x80004005
- SCCM OSD – Domain Join Failed with Error code 0x54b on HP Elitebook 840 G8
- ccmsetup failed with error code 0x87d00227
- Fix Application Deployment error 0x87d00213 in ConfigMgr
- CMG Connection Point Status Disconnected | SCCM | ConfigMgr
- CMG Setup – Subscription ID drop down not populating
- CMG Setup – Error when granting Contributor permission to the Azure AD app
- Failed to connect with DP – Error Code 0x8004100e | ConfigMgr | SCCM
- SCCM Client Installation Failed with error 0x87d0027e
- ConfigMgr OSD – PXE Troubleshooting
- SCCM WSUS sync error – Sync Failed – WSUS server not configured
- SCCM Software Distribution Troubleshooting
Subscribe to Techuisitive Newsletter
Be the first to know about our new blog posts. Get our newsletters directly in your inbox and stay up to date about Modern Desktop Management technologies & news.