Invoke-CMClientUpdateDeploymentEvaluation.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#region Invoke-CMClientUpdateDeploymentEvaluation
<#
.SYNOPSIS
 This function invokes an update deployment eval on a ConfigMgr client
.DESCRIPTION
 
.PARAMETER Computername
 The name of the system you'd like to invoke the action on
.PARAMETER AsJob
 Specify this parameter if you'd like to run this as a background job.
.EXAMPLE
 PS C:\> Invoke-CMClientUpdateDeploymentEvaluation -Computername 'Value1' -AsJob
.NOTES
 
#>

function Invoke-CMClientUpdateDeploymentEvaluation {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
   ValueFromPipeline = $true,
   ValueFromPipelineByPropertyName = $true)]
[string[]]$Computername,
[Parameter()]
[switch]$AsJob
)

Begin {

}
Process {
foreach ($Computer in $Computername) {
            $Params = @{
    'Computername' = $Computer;
    'ClientAction' = 'UpdateDeployment';
    'AsJob' = $AsJob.IsPresent
    }
    Invoke-CMClientAction @Params
            }
}
End {

}
}
#endregion