Hi there,
I have several things which i’m struggling with.
I’m trying to schedule a package program deployment for a specific device collection.
1st thing : probably because i’m using a too old version of SCCM, the cmdlet New-CMPackageDeployment doesn’t exit
I’m able to create a package and package programs as well but this cmdlet which i found in several docs is not available in my module
So i started to look towards the Start-CMPackageDeployment cmdlet which seems to operate the same way (if someone can confirm)
2nd thing : i understood (but i hope i’m not wrong) that when the question comes about scheduling something in SCCM, you need to create a schedule token object via the New-CMSchedule cmdlet and then, use this object within the Start-CMPackageDeployment
And this is where the crap starts
I’m absolutely not able to achieve something viable.
For reference, i put my code below and if someone can provide me with some help, that would be highly appreciated (of course, an answer such as “upgrade to a newer version of SCCM” is NOT an answer )
Thanks
$CollectionName = "TargetCollection Test #1"
$ProgramName = "Dummy Prg"
$packageName = "Dummy Package"
$deployPurpose = "Required"
$RerunBehavior = "RerunIfFailedPreviousAttempt"
$useUTC = $false
$DeploymentSchedule = New-CMSchedule -Start $deploymentStartTime -Nonrecurring
Start-CMPackageDeployment -collectionName $CollectionName -StandardProgramName $deviceProgramName -packageName $packageName -schedule $DeploymentSchedule -deployPurpose $deployPurpose -RerunBehavior $RerunBehavior -useUTC $useUTC