Hi. I’m running a task sequence using the Toolkit with the commands below. When I run Deploy-Application.exe on the computer it runs ok. When I run the command using SCCM I get the error
Error HRESULT E_Fail has been returned from a call to a COM Component. Exact error attached.
$TSName = “Windows10-Upgrade-1809-v2.0”
$trigger = “{00000000-0000-0000-0000-000000000021}”
$machine = $env:COMPUTERNAME
$SoftwareCenter = New-Object -ComObject “UIResource.UIResourceMgr”
$TS = SoftwareCenter.GetAvailableApplications() | ?{.PackageName -eq “$TSName”}
Invoke-WmiMethod -Namespace root\ccm -Class sms_client -Name TriggerSchedule $trigger
$TS = SoftwareCenter.GetAvailableApplications() | ?{.PackageName -eq “$TSName”}
SoftwareCenter.ExecuteProgram((TS.ID),($TS.PackageID),$true)
Any Idea’s ?
My Package Program is set to run as Administrator & “Allow users to Interact with program”