This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SCCM cmdlets with ARS script ?

Upgraded Dev envt from 6.9 to 7.3.1

Have a requirement to run a workflow triggered by group membership change and then run a script module which integrates with SCCM (ie use get-CMDevice to determine any computers assigned to the user that was added/removed in the membership change.

Is it possible to run SCCM cmdlets from scripts on the ARS server.

I am able to run the scripts against the SCCM server to retrieve the info but need to embed it into ARS.

Any suggestions please?  Anyone done something similar.  Wanted to run the script on the ARS server (which has the SCCM client) rather than remotely execute the command against the SCCM server.

  • You will need to deploy the SCCM PoSh module on your AR Server(s) and then make sure you include an import-module command for the SCCM module in your AR-integrated scripts.

  • I managed to get the module installed and was able connect to the site from a script running from workflow but cannot run the get-cmdevice.  As if the cmdlets don't exist.
    Very odd that I can run the same script on the ARS server but outside of ARS and it works fine.
    I've had to resort to doing the SCCM export separately as a scheduled task exporting to CSV and then interrogate the CSV at workflow run-time.
    Bit irritating, as got 890% there.

    Thanks for your help.