Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

NEW Problems deploying packages running PowerShell scripts

DavidBrookesPTA

New Member
Messages
1
Reaction score
0
Points
1
Have an issue when deploying packages running PowerShell scripts on a couple of different machines. Packages are failing to install via the SCCM client but will when run manually from the downloaded source from SCCM in PowerShell ISE. I am getting the following errors:

App enforcement environment:
Context: Machine
Command line: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoProfile -file .\CardaxCommandCentreInstall.ps1
Allow user interaction: No
UI mode: 1
User token: null
Session Id: 2
Content path: C:\WINDOWS\ccmcache\1o
Working directory: AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
Prepared working directory: C:\WINDOWS\ccmcache\1o AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
Prepared command line: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NoProfile -file .\CardaxCommandCentreInstall.ps1 AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
Executing Command line: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NoProfile -file .\CardaxCommandCentreInstall.ps1 with user context AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
Working directory C:\WINDOWS\ccmcache\1o AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
ScriptHandler::EnforceApp failed (0x80070005). AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
AppProvider::EnforceApp - Failed to invoke EnforceApp on Application handler(0x80070005). AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
CommenceEnforcement failed with error 0x80070005. AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
Method CommenceEnforcement failed with error code 80070005 AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)
++++++ Failed to enforce app. Error 0x80070005. ++++++ AppEnforce 14/12/2022 2:37:09 PM 2728 (0x0AA8)

Issue has occurred with more than one package using a PowerShell script to deploy the package. Can anyone please help?
 
Last edited:

Forum statistics

Threads
7,136
Messages
27,873
Members
18,159
Latest member
jordysmits
Back
Top