问题
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