Quantcast
Channel: Configuration Manager 2012 - Operating System Deployment forum
Viewing all articles
Browse latest Browse all 9126

Starting a Task Sequence using PowerShell and WMI

$
0
0

Hello all,

I'm trying to use powershell to execute a task sequence.

I can find the proper task sequence and assign it to a variable like this

$i = Get-WmiObject -Class CCM_Program -Namespace "root\ccm\clientsdk" | Where-Object { $_.Name -like "*some search term* }

but I cannot figure out how to use Invoke-WmiMethod the Execute the task sequence.

I tried something like this

Invoke-WmiMethod -class  CCM_Program -Name ExecuteProgram -argumentlist $i.packageid $i.programid

but the programid for a task sequence is * and it doesn't seem to like that.

Anybody done this before?

Thanks

Dave


Dave Barker


Viewing all articles
Browse latest Browse all 9126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>