Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 559
  • Last Modified:

What is the way to call PowerShell from MS System Center Configuration Manager to automate rollout

Hi,
Background:
1) I have a PowerShell 2.0 script that does things on remote machines across the enterprise
2) I use Microsoft System Center's Configuration Manager to automate the rollout of updates and configuration work across the enterprise

Question:
How do I call PowerShell scripts from System Center Configuration Manager automated tool?
0
stuckp1
Asked:
stuckp1
  • 2
1 Solution
 
rwskasCommented:
I would imagine you could just call PowerShell via SCCM using the correct params. Example below is assuming you want to run 'myscript.ps1' from the C:\Scripts folder on the local machine

So basically, your launching powershell, and telling it to run the command (-c) C:\Scripts\MyScript.ps1

0
 
rwskasCommented:

Powershell.exe -NoProfile -ExecutionPolicy Unrestricted -C "C:\Scripts\MyScript.ps1"

Open in new window

0
 
stuckp1Author Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now