Powershell to run task sequence from software center

五迷三道 提交于 2019-12-11 07:01:54

问题


I have Windows OS image advertised in software center which I can manually hit install that reimages the system and does other configuration afterwards. I would like to automate the execution using Powershell. I am able to do do for other advertised software like notepad++, chrome, and software updates but not to OS image. Is there any way automate it at the client side using Powershell or any other script? I do not have SCCM access to push the task sequence. Thank you


回答1:


Try the UIResourceMgr COM-object. Example (source):

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


来源:https://stackoverflow.com/questions/41646811/powershell-to-run-task-sequence-from-software-center

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!