none
Triggering a task sequence as system

    Question

  • If I run the below code under the user context it works fine to run the task sequence.  Unfortunately in my environment user's can't run PowerShell. So I have to run it as a scheduled task under system where it does not seem to have visibility of the task.  The strange thing is I have done a similar thing for applications and packages and it works, but not with task sequences.

    $UI = New-Object -ComObject "UIResource.UIResourceMgr"
    
    $ProgramID = "*"
    $PackageID = "PACKAGEID"
    
    $UI.ExecuteProgram($ProgramID, $PackageID, $true)

    Tuesday, April 10, 2018 7:24 AM

All replies