How to Fix SCCM Application Deployment Error 0x87d01106

Issue

When monitoring the application deployment through SCCM report, the following deployment error was logged for multiple devices.

Error description: Failed to verify the executable file is valid or to construct the associated command line

SCCM Application Deployment Status report

Further investigation on client machine shows below error in AppEnforce.log file.

Error in C:\Windows\ccm\logs\AppEnforce.log File :

App enforcement environment:

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 ).

SCCM error 0x87d01106

Cause for Error 0x87d01106 

The application was trying to execute a PowerShell script. However, PowerShell.exe could not be located on client computers. The full path for Powershell.exe file was not provided in command line.

powershell.exe -ExecutionPolicy ByPass -File MyScript.ps1

PowerShell.exe path must be defined in PATH environment variable. By default, Powershell.exe path is defined in PATH environment variable however it may overwritten by other applications due to misconfiguration. Hence, the deployment will fail on the computers where Powershell.exe path does not exists in PATH environment variable.

SCCM Program

Solution for Error 0x87d01106 

It’s better to provide the complete path for PowerShell executable in program command line. This will eliminate the dependency over PATH environment variable as PowerShell.exe can be located by the path provided with command line.

The complete path to execute PowerShell script should be like this:

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File MyScript.ps1

Command line for SCCM Application

Related Posts:

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.

Scroll to Top