Jump to content


Search the Community

Showing results for tags 'Start-CMSoftwareUpdateDeploy'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Cloud
    • Azure
    • Microsoft Intune
    • Office 365
  • General Stuff
    • General Chat
    • Events
    • Site News
    • Windows News
    • Suggestion box
    • Jobs
  • MDT, SMS, SCCM, Current Branch &Technical Preview
    • How do I ?
    • Microsoft Deployment Toolkit (MDT)
    • Official Forum Supporters
    • SMS 2003
    • Configuration Manager 2007
    • Configuration Manager 2012
    • System Center Configuration Manager (Current Branch)
    • Packaging
    • scripting
    • Endpoint Protection
  • Windows Client
    • how do I ?
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
    • windows screenshots
  • Windows Server
    • Active Directory
    • Microsoft SQL Server
    • System Center Operations Manager
    • KMS
    • Windows Deployment Services
    • NAP
    • Failover Clustering
    • PKI
    • Windows Server 2008
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Hyper V
    • Exchange
    • IIS/apache/web server
    • System Center Data Protection Manager
    • System Center Service Manager
    • System Center App Controller
    • System Center Virtual Machine Manager
    • System Center Orchestrator
    • Lync
    • Application Virtualization
    • Sharepoint
    • WSUS

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hello All, I have a Powershell script that I use to create multiple Software Update Deployments and it works perfectly (well almost). The last piece I'm missing is automating the deadline date. Currently I just have it getting the current date and adding 5 days. I then go into each deployments properties and change the date/time to the desired info. I've been trying to work out automating this a little bit by adding a variable for a static date/time. I can then change this date (time will always be the same) to the desired info at script run. Below is what I've come up with so far. The -EnforcementDeadlineDay piece works on it own, in that it outputs the correct date with an incremented time. However once I put it in the full script i get the below errors. Any help is much appreciated. Cheers, Mike Script: # Monthly Deployment Date #$DeploymentDate = Get-Date -Format "yyyy-MM" $DeploymentDate = (Get-Date).AddDays(-30).ToString("yyyy-MM") $DeadlineDate = Get-Date -Month 08 -Day 07 -Year 2016 -Hour 17 -Minute 0 -Second 0 # Software Update Groups $SUPGroupName1 = "EN5 - EDC - Year 2013- ($DeploymentDate) Reference 1" $SUPGroupName2 = "EN5 - EDC - Year 2013+ ($DeploymentDate) Reference 2" #Load Configuration Manager PowerShell Module Import-module ($Env:SMS_ADMIN_UI_PATH.Substring(0,$Env:SMS_ADMIN_UI_PATH.Length-5) + '\ConfigurationManager.psd1') #Get SiteCode and set Powershell Drive $SiteCode = Get-PSDrive -PSProvider CMSITE Set-location $SiteCode":" # Create Standard Deployments (Group 1) $DeploymentName = "EN5 - PM Dev ($DeploymentDate) Reboot Deployment # 1" $DeploymentCount = 6 $Count = 0 1..$DeploymentCount | ForEach-Object { $Count++ Write-Progress -Activity "Creating Deployment Group 1" -Id 1 -Status "Running $($Count) / $($DeploymentCount)" -PercentComplete (($Count / $DeploymentCount) * 100) Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "$SUPGroupName1" -CollectionName "EN5 - PM - Deployment $Count (Lab)" -DeploymentName "$DeploymentName-$Count" -DeploymentType Required -VerbosityLevel AllMessages -TimeBasedOn LocalTime -DeploymentAvailableDay (Get-Date) -EnforcementDeadlineDay $DeadlineDate.ToLongDateString()$DeadlineDate.Addhours($Count).ToLongTimeString() -UserNotification HideAll -SoftwareInstallation $True -AllowRestart $True -RestartServer $False -RestartWorkstation $False -ProtectedType RemoteDistributionPoint -UnprotectedType UnprotectedDistributionPoint -GenerateSuccessAlert $False -DisableOperationsManagerAlert $False -GenerateOperationsManagerAlert $False -PersistOnWriteFilterDevice $False -UseBranchCache $False } Write-Progress -Activity "Creating Deployment Group 1" -Id 1 -Completed Errors: Start-CMSoftwareUpdateDeployment : A positional parameter cannot be found that accepts argument '6:00:00 PM'. At E:\scripts\EN5 - CreateDeployments - LAB.ps1:24 char:5 + Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "$SUPGroupName1" - ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: ( [Start-CMSoftwareUpdateDeployment], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.Sum.Commands.StartSoftwareUpdateDeploymentCommand Start-CMSoftwareUpdateDeployment : A positional parameter cannot be found that accepts argument '7:00:00 PM'. At E:\scripts\EN5 - CreateDeployments - LAB.ps1:24 char:5 + Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "$SUPGroupName1" - ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: ( [Start-CMSoftwareUpdateDeployment], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.Sum.Commands.StartSoftwareUpdateDeploymentCommand Start-CMSoftwareUpdateDeployment : A positional parameter cannot be found that accepts argument '8:00:00 PM'. At E:\scripts\EN5 - CreateDeployments - LAB.ps1:24 char:5 + Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "$SUPGroupName1" - ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: ( [Start-CMSoftwareUpdateDeployment], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.Sum.Commands.StartSoftwareUpdateDeploymentCommand Start-CMSoftwareUpdateDeployment : A positional parameter cannot be found that accepts argument '9:00:00 PM'. At E:\scripts\EN5 - CreateDeployments - LAB.ps1:24 char:5 + Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "$SUPGroupName1" - ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: ( [Start-CMSoftwareUpdateDeployment], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.Sum.Commands.StartSoftwareUpdateDeploymentCommand Start-CMSoftwareUpdateDeployment : A positional parameter cannot be found that accepts argument '10:00:00 PM'. At E:\scripts\EN5 - CreateDeployments - LAB.ps1:24 char:5 + Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "$SUPGroupName1" - ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: ( [Start-CMSoftwareUpdateDeployment], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.Sum.Commands.StartSoftwareUpdateDeploymentCommand Start-CMSoftwareUpdateDeployment : A positional parameter cannot be found that accepts argument '11:00:00 PM'. At E:\scripts\EN5 - CreateDeployments - LAB.ps1:24 char:5 + Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName "$SUPGroupName1" - ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: ( [Start-CMSoftwareUpdateDeployment], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.Sum.Commands.StartSoftwareUpdateDeploymentCommand
×
×
  • Create New...