Invoke OSD Task sequence remotely with Powershell


Earlier blog posts on invoking Installations:


Software Updates


This is a continuation on how to invoke or trigger installations in Software center remotely with the help of Powershell. This blog post came about after i got a question from a user called Sonik on the Application post i did.



Will this work to install Operating System as well? I have the operating system image available in the software center and It works when I manually select and install. But not with this script. Any idea?



Hey, No it won’t work because Configuration Manager uses different built in functions to trigger OSD then applications. I don’t know which WMI class it is right now but i will take a look and see if i can figure it out.


And below is the result on how to do it. Hope this will help you Sonik.


What do we want to Achieve?


We wan’t to be able to invoke an installation of an available OSD Task Sequence in Software Center remotely on a system.

One might wonder why and it’s pretty simple, it saves us time and we are lazy 😀



The Script


function Invoke-OSDInstall
[String][Parameter(Mandatory=$True, Position=1)] $Computername,
[String][Parameter(Mandatory=$True, Position=2)] $OSDName


$CIMClass = (Get-CimClass -Namespace root\ccm\clientsdk -ComputerName $Computername -ClassName CCM_ProgramsManager)
$OSD = (Get-CimInstance -ClassName CCM_Program -Namespace "root\ccm\clientSDK" -ComputerName $Computername | Where-Object {$_.Name -like "$OSDName"})

$Args = @{PackageID = $OSD.PackageID
ProgramID = $OSD.ProgramID


Invoke-CimMethod -CimClass $CIMClass -ComputerName $Computername -MethodName "ExecuteProgram" –Arguments $Args

End {}


The script is also available for download over at Technet




Until next time, cheers Timmy !

You can find me over at