Trigger SCCM client actions with powershell

golden alick 100 Reputation points
2023-10-24T12:02:29.4066667+00:00

I known I can perform the client actions in control panel>Configuration Manager client properties>Action tab, is there any way to trigger the actions with powershell?

Thanks in advance.

Microsoft Configuration Manager
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,151 questions
{count} votes

Accepted answer
  1. AllenLiu-MSFT 41,136 Reputation points Microsoft Vendor
    2023-10-25T02:25:56.2533333+00:00

    Hi, @golden alick

    Thank you for posting in Microsoft Q&A forum.

    Yes, you can trigger Configuration Manager client actions with PowerShell. The Invoke-CMClientAction cmdlet can be used to invoke client actions on Configuration Manager clients. Here's an example of how to use it to trigger a machine policy retrieval and evaluation cycle:

    Invoke-CMClientAction -DeviceName "Computer01" -Action MachinePolicyRetrievalEvalCycle
    

    Replace "Computer01" with the name of the device you want to trigger the action on. You can also use the -CollectionName parameter to trigger the action on all devices in a collection.

    Other available actions include UserPolicyRetrievalEvalCycle, SoftwareInventoryCycle, HardwareInventoryCycle, DiscoveryDataCollectionCycle, and more. You can find a full list of available actions in the Microsoft documentation.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".


0 additional answers

Sort by: Most helpful