How to evaluate(trigger) any configuration baseline from configuration manager using command prompt without using powershell??
Kindly help.
How to evaluate(trigger) any configuration baseline from configuration manager using command prompt without using powershell??
Kindly help.
Hello BhSneU,
Do you mean something like this?:
Create a new function as:
function Invoke-BaselineEvaluation
{
param (
[String][Parameter(Mandatory=$true, Position=1)] $ComputerName,
[String][Parameter(Mandatory=$False, Position=2)] $BLName
)
If ($BLName -eq $Null)
{
$Baselines = Get-WmiObject -ComputerName $ComputerName -Namespace root\ccm\dcm -Class SMS_DesiredConfiguration
}
Else
{
$Baselines = Get-WmiObject -ComputerName $ComputerName -Namespace root\ccm\dcm -Class SMS_DesiredConfiguration | Where-Object {$_.DisplayName -like $BLName}
}
$Baselines | % {
([wmiclass]"\\$ComputerName\root\ccm\dcm:SMS_DesiredConfiguration").TriggerEvaluation($.Name, $.Version)
}
}
Run with:
Invoke-BaselineEvaluation -ComputerName <hostname> -BLName "<baseline name>"
Hope this helps with your query,
Best regards,
3 people are following this question.