1

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

8
  • First thing, we have sccm module for PS. But for that you need to have SCCM. I am not sure what actually your concern is. Commented Jan 14, 2017 at 7:18
  • @RanadipDutta The SCCM module is for the SCCM server environment, which he doesn't have access to. LandOfCake, what you have tried? I'm at home now and can't verify it, but UIResource COM-object should work. Ex. sepago.com/blog/2013/09/06/… . Ask your SCCM admin before running this. The deployment is made optional for a reason. What if someone hasn't saved their work? Commented Jan 14, 2017 at 15:08
  • My use case is little different than usual: I have automated test execution which depends on successful build. Then I have to reimage around 20 servers with server 2012 r2 std and 20 clients with with dowsing 10 os. I currently do this by selecting task sequence manually from software center. But, it is wasting a lot of my time and preventing to run my tests in fully automated faison. The task sequence to deploy OS, and other configurations are available in the software center but not able to execute it programitacilly. Nobody else is using any of these system but me. Commented Jan 16, 2017 at 17:21
  • @LandOfCake: Please accept/upvote the answer if it helps you Commented Jan 16, 2017 at 17:26
  • 2
    As described by David O'Brien at link provided by @Frode F. the solution is to use package ID to execute OSD task sequence. Thank you so much. Here is an example: $UI = New-Object -ComObject "UIResource.UIResourceMgr" $ProgramID = "*" $PackageID = "%PutInYourPackageID%" $UI.ExecuteProgram($ProgramID, $PackageID, $true) Commented Jan 16, 2017 at 20:04

1 Answer 1

1

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

$UI = New-Object -ComObject "UIResource.UIResourceMgr"
 
$ProgramID = "*"
$PackageID = "PACKAGEID"
 
$UI.ExecuteProgram($ProgramID, $PackageID, $true)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.