question

BhSneU-1956 avatar image
0 Votes"
BhSneU-1956 asked LimitlessTechnology-2700 published

Evaluation of configuration baselines

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

Kindly help.

windows-10-network
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BhSneU-1956 avatar image
0 Votes"
BhSneU-1956 answered

Can somebody help me with this please?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered LimitlessTechnology-2700 published

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,

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.