SCCM Deployment issue

When i run PSAD locally with elevated cmd-prompt everything works fine and it triggers the Task Sequence that is targeted.
But when i try to deploy it from SCCM it runs trough without any faults but it doesnt trigger the Task Sequence. The deployment is successful without errors.
The code i am trying to trigger is:’
i = Get-WmiObject -Class CCM_Program -Namespace "root\ccm\clientsdk" | Where-Object { _.Name -like “Prepare Firmware and Enable BitLocker” }
Invoke-WmiMethod -class CCM_ProgramsManager -Namespace “root\ccm\clientsdk” -Name ExecutePrograms -argumentlist $i

Does anyone have any clue what i need to change to get i working from SCCM?

Solved it by running the script that is going to trigger the TS in user context…Forgot that accessing Software Center requires user context because it runs as the user…