Evaluation of configuration baselines

BhSneU 1 Reputation point
2021-09-20T16:45:51.31+00:00

How to evaluate(trigger) any configuration baseline from configuration manager using command prompt without using powershell??

Kindly help.

Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,368 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. BhSneU 1 Reputation point
    2021-09-21T09:29:11.247+00:00

    Can somebody help me with this please?

    0 comments No comments

  2. 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,

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.