• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 558
  • 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

Featured Post

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

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