Forum Discussion

Kevin Ryan's avatar
Kevin Ryan
Copper Contributor
Oct 02, 2019

Run Script not available in the SDK?

Hi,

 

I am trying to automate running a published PowerShell script.

In the ConfigMgr console I can add a PowerShell script in the software library. From the console I can then run the script on a target device or collection.

I am wondering if the 'run script' function is published so that I can call it from another script and pass the appropriate parameters. I can only find published API for adding/running PowerShell scripts to a task sequence?

thanks

1 Reply

  • Kevin Ryan's avatar
    Kevin Ryan
    Copper Contributor

    OK I think I found the answer to my own question so I may as well psot here in case it proves useful to anyone else . 

     

    https://docs.microsoft.com/en-us/powershell/module/configurationmanager/invoke-cmscript?view=sccm-ps

     

     

Resources