none
Set-CMAutoDeploymentRuleDeployment and SendWakeupPacket $True RRS feed

  • Question

  • I previously used a script to update all the ADRs to configure future deployments with WoL enabled.

    Now I'm attempting to enable WoL for all the current deployments for each ADR.  But my use of Set-CMAutoDeploymentRuleDeployment doesn't seem to be working.

    I am guessing there is a required parameter missing but even with VerboseLevel set to AllMessages, I'm not getting any output to go from.

    $ADRs = Get-CMAutoDeploymentRule
    ForEach ($ADR in $ADRs) {
        $Deployments = $ADR | Get-CMAutoDeploymentRuleDeployment
        ForEach ($Deployment in $Deployments) {
            Set-CMAutoDeploymentRuleDeployment -InputObject $Deployment -SendWakeupPacket $True -VerboseLevel AllMessages
        }
    }


    There's no place like 127.0.0.1

    Friday, May 3, 2019 8:32 PM

All replies

  • Hello Matt,
     
    I have tested your script in my lab. In fact, it works pretty well. It enables WoL for all deployments in all ADRs, so I'm sure there isn't any syntax error in the script you provide. It would be better if you could ensure that you have imported the Configuration Manager PowerShell module successfully and connected to the proper site. And it would be helpful if you could tell us how it doesn't work. Is there any error message? Does it not enable WoL for any deployment?
     
    By the way, "-VerboseLevel" is used to specify how much state detail the clients report back for deployments created by this rule. It doesn't provide any output for the command itself.
     

      
    Hope my answer could help you and look forward to your feedback.
     
    Best Regards,
    Ray

    Please remembers to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, May 6, 2019 2:11 AM
  • Hi Ray, thanks for your reply.

    If I modify the script with some output, I see it's finding each of the ADR deployments, but when I check the deployment settings, WoL is still not enabled.  Besides the Write-Host lines I added, there is no output from the script, error or otherwise.

    Set-Location 001:
    $ADRs = Get-CMAutoDeploymentRule
    ForEach ($ADR in $ADRs) {
        Write-Host $ADR.Name -ForegroundColor Cyan
        $Deployments = $ADR | Get-CMAutoDeploymentRuleDeployment
        ForEach ($Deployment in $Deployments) {
            Write-Host $Deployment.CollectionName -ForegroundColor Yellow
            Set-CMAutoDeploymentRuleDeployment -InputObject $Deployment -SendWakeupPacket $True
        }
    }
    Set-Location C:

    Output:

    ADR - Windows Update - Visual Studio
    Development - Windows Updates - All Windows Clients
    Production - Windows Updates - All Windows Clients
    Teller - Windows Updates - All Windows Clients
    ADR - Windows Update - Office 365 - Semi Annual
    Development - Windows Updates - All Windows Clients
    Production - Windows Updates - All Windows Clients
    Teller - Windows Updates - All Windows Clients
    IT Beta - Windows Updates - All Windows Clients
    NOC - Windows Updates - All Windows Clients
    ADR - Windows Update - Office 365 - Monthly
    Office 365 Semi-Annual Targeted


    There's no place like 127.0.0.1


    • Edited by Matt5150 Monday, May 6, 2019 4:02 PM
    Monday, May 6, 2019 4:01 PM
  • Hello Matt,
     
    The new script is still working in my lab.
     
    It would be helpful if you could test that whether the single command "Set-CMAutoDeploymentRuleDeployment -ID <id> -SendWakeupPacket $true" could work in your lab. Would it work if we use PowerShell connected from the SCCM console? What if we change the current account? 
     
    Best Regards,
    Ray

    Please remembers to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, May 7, 2019 1:16 PM
  • Hello,
     
    I noticed that you have not updated for several days. So is your issue solved? Or is there any update? Feel free to feedback.
     
    Best Regards,
    Ray

    Please remembers to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, May 10, 2019 9:46 AM