Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
556 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

670 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