Unable to Figure Out package deployment using Powershell

Vikram Midha 26 Reputation points
2020-12-10T11:59:34.967+00:00

Hi,

I am trying to work on creating bulk collections and then deploy existing packages on them. Was successful in creating the collections. However, facing issues when using PowerShell to deploy the package using below command.

Set-CMPackageDeployment -CollectionName "collection name here" -PackageName "package name here" -StandardProgramName "package program name" -DeployPurpose Required -DeploymentAvailableDateTime "2020-12-10 13:00"

This is not working failing with "parameter set cannot be resolved using specified name parameters"

Any suggestions?

Thanks!

Microsoft Configuration Manager Application
Microsoft Configuration Manager Application
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Application: A computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
480 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 43,951 Reputation points Microsoft Vendor
    2021-04-13T08:39:50.627+00:00

    Hi,@Vikram Midha
    For example, we set Deadline to 10 days from now at 8PM, I test the script in my lab, it create the deployment well:

    [datetime]$DeadlineTime = (get-date -Hour 20 -Minute 0 -Second 0).AddDays(10)  
    $NewScheduleDeadline = New-CMSchedule -Start $DeadlineTime -Nonrecurring  
    New-CMPackageDeployment -CollectionName "collection name here" -PackageName "package name here" -StandardProgramName "package program name" -DeployPurpose required -AvailableDateTime "2020-12-10 13:00" -StandardProgram -FastNetworkOption DownloadContentFromDistributionPointAndRunLocally -SlowNetworkOption DownloadContentFromDistributionPointAndLocally -RerunBehavior RerunIfFailedPreviousAttempt -Schedule $NewScheduleDeadline  
    

3 additional answers

Sort by: Most helpful
  1. Jason Sandys 31,286 Reputation points Microsoft Employee
    2020-12-10T17:11:34.36+00:00

    To create a deployment, you need to use New-CMPackageDeployment.


  2. AllenLiu-MSFT 43,951 Reputation points Microsoft Vendor
    2020-12-11T02:57:57.987+00:00

    @Vikram Midha
    Thank you for posting in Microsoft Q&A forum.
    You need the parameter -StandardProgram with your command.
    New-CMPackageDeployment -CollectionName "collection name here" -PackageName "package name here" -StandardProgramName "package program name" -DeployPurpose Required -AvailableDateTime "2020-12-10 13:00" -StandardProgram

    And schedule must be set for "required" deploypurpose.
    https://video2.skills-academy.com/en-us/powershell/module/configurationmanager/new-cmpackagedeployment?view=sccm-ps#example-4--with-required-schedule--deadline-in-10-days


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Vikram Midha 26 Reputation points
    2021-04-12T14:46:42.037+00:00

    @AllenLiu-MSFT

    or

    anyone?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.