Can somebody help me with this please?
Evaluation of configuration baselines
How to evaluate(trigger) any configuration baseline from configuration manager using command prompt without using powershell??
Kindly help.
2 answers
Sort by: Most helpful
-
-
Limitless Technology 39,721 Reputation points
2021-09-21T10:38:00.483+00:00 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,