Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-24
3
Medium Priority
?
557 Views
Last Modified: 2012-05-11
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
Comment
Question by:stuckp1
  • 2
3 Comments
 
LVL 6

Expert Comment

by:rwskas
ID: 35207750
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
 
LVL 6

Accepted Solution

by:
rwskas earned 2000 total points
ID: 35207759

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

Open in new window

0
 

Author Closing Comment

by:stuckp1
ID: 35208687
Thanks!
0

Featured Post

WatchGuard Case Study: NCR

With business operations for thousands of customers largely depending on the internal systems they support, NCR can’t afford to waste time or money on security products that are anything less than exceptional. That’s why they chose WatchGuard.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question