Solved

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

Posted on 2011-03-24
3
547 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 500 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Set OWA language and time zone in Exchange for individuals, all users or per database.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Viewers will learn the different options available in the Backstage view in Excel 2013.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

896 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now