Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

NEW push ps1 using cm

Messages
10
Reaction score
0
Points
1
Hi All

i am new to sccm, i need to run a PowerShell script on few servers.
lets say i have a folder1-inside folder1 i have folder2(this folder has files) and a PowerShell script.
folder1-->folder2 & script.ps1
i have a collection of servers. i want to run script.ps1 on this collection.
So i need to copy folder1 on all the servers from sccm and execute the script.
if the entire folder1 is copied to temp. the PowerShell script should execute in this way c:\temp\folder1\script.ps1.
Experts guide me how to achieve this.
 
There are no tricks to this, Create a package/program as you would any other program. Make your command line the PowerShell CMD. Deploy this to a collection.
 
1671201377774.png
Accept defaults
Add deployment type
1671201443591.png
1671201681868.png
Accept default and complete the profile creation. Distribute to all DP. Deploy to collections. That's it!!
 
Back
Top