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!

PENDING Package stuck installing

piggywhiskers

New Member
Messages
3
Reaction score
1
Points
3
Version 2309

I've deployed a package that will run a PS script. The script works fine when run through PowerShell on the client, software installs, but when running it via Software Centre it gets stuck installing.

Deployed from Distribution Point.

Looking at exec.mgr log, I have this last line of action and then nothing more:
MTC task with id {73776C76-F5F5-47EB-B40C-CC17305ED230}, changed state from 4 to 5

Any suggestions?

Command line = "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe" -executionPolicy unrestricted -noexit -file "Agent 3.0.1 Package.ps1"
 
Version 2309

I've deployed a package that will run a PS script. The script works fine when run through PowerShell on the client, software installs, but when running it via Software Centre it gets stuck installing.

Deployed from Distribution Point.

Looking at exec.mgr log, I have this last line of action and then nothing more:
MTC task with id {73776C76-F5F5-47EB-B40C-CC17305ED230}, changed state from 4 to 5

Any suggestions?

Command line = "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe" -executionPolicy unrestricted -noexit -file "Agent 3.0.1 Package.ps1"
I don't see any issues with that command. Try what @rob287 mentioned.
 
just had a quick look at one of mine that deploys a BIOS package via Ps.

C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -Bypass -Command "&{.\****.ps1}"
Thank you, this progressed it further!
I don't see any issues with that command. Try what @rob287 mentioned.
Rob287 did help, I am past the MTC issue. That being siad not gettting:

Code:
MTC task with id {64B8CD21-C6A5-482F-A302-0E5E36020A89}, changed state from 4 to 5    execmgr    26/01/2024 10:21:45    4396 (0x112C)
Program exit code 1    execmgr    26/01/2024 10:21:46    4412 (0x113C)
Looking for MIF file to get program status    execmgr    26/01/2024 10:21:46    4412 (0x113C)
Script for Package:FRC00BE7, Program: NCPA Agent failed with exit code 1    execmgr    26/01/2024 10:21:46    4412 (0x113C)
Raising event:
[SMS_CodePage(850), SMS_LocaleID(2057)]
instance of SoftDistProgramErrorEvent
{
    AdvertisementId = "FRC2271F";
    ClientID = "GUID:32C22773-B9F1-4236-ABA1-0C5C279EA7E8";
    DateTime = "20240126102146.587000+000";
    ExitCode = "1";
    MachineName = "SGEN-WG02";
    PackageName = "FRC00BE7";
    ProcessID = 5712;
    ProgramName = "NCPA Agent";
    SiteCode = "XXX";
    ThreadID = 4412;
    UserContext = "NT AUTHORITY\\SYSTEM";
};
    execmgr    26/01/2024 10:21:46    4412 (0x113C)
Raised Program Error Event for Ad:FRC2271F, Package:FRC00BE7, Program: NCPA Agent    execmgr    26/01/2024 10:21:46    4412 (0x113C)
Execution is complete for program NCPA Agent. The exit code is 1, the execution status is FailureNonRetry    execmgr    26/01/2024 10:21:46    4412 (0x113C)
This machine is not a workstation, returning false for MDMIsExternallyManaged.    execmgr    26/01/2024 10:21:46    4412 (0x113C)

So migtht be something to do with the script, but it does work when running it normally.
 
Last edited:
Bit further now, changed the suggestiong from: C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -Bypass -Command "&{.\****.ps1}"

to

C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -Command "&{.\****.ps1}"

It runs, no errors, but doesn't install at all. o_O
 
I guess the script is fine, but from the log, i see this:
Execution is complete for program NCPA Agent. The exit code is 1,
 
Bit further now, changed the suggestiong from: C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -Bypass -Command "&{.\****.ps1}"

to

C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -Command "&{.\****.ps1}"

It runs, no errors, but doesn't install at all. o_O
Just needed the executionpolicy in there. Glad i could help
 

Forum statistics

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