SCCM Current Branch - Export all sccm console Run Scripts

Brad Benner 21 Reputation points
2021-10-12T21:47:20.24+00:00

Good Afternoon,
I am looking for a way to export and\or transfer all of the defined Run Scripts in the SCCM console. I have been searching everywhere I can possibly think of and I have not found a way. All of the scripts seem to be stored in the SMS_Script WMI provider and I have not found a functional way to export the actual script. I found the Scripts table in the SQL database and the scripts appear to be stored in a hashed form however I cannot figure out a way to convert them back to their powershell text form. Any information or assistance would be greatly appreciated.

Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Amandayou-MSFT 11,166 Reputation points
    2021-10-13T06:35:02.88+00:00

    Hi @Brad Benner ,

    We could use the following sql query to export all of the defined Run Scripts in the SCCM console.

    select ScriptName, Script from vSMS_Scripts

    Here is the test result:

    140087-1013.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Brad Benner 21 Reputation points
    2021-10-13T13:13:17.9+00:00

    @Amanadayou-MSFT,
    That is exactly what I was looking for. Thank you so much. Your assistance and expedient response is greatly appreciated.

    0 comments No comments

Your answer

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