Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Help getting a Powershell script to execute through SCCM 2012

Avatar of ndalmolin_13
ndalmolin_13Flag for United States of America asked on
PowershellSCCM
5 Comments1 Solution683 ViewsLast Modified:
Hello SCCM Experts,

We are running SCCM 2012.  I have a PowerShell script that simply creates a folder called PSTest on the C drive of a computer.  I want to push this out via SCCM.  Here are the steps I’m going in trying to get this script to run via SCCM:
1.      Log into SCCM server.
2.      Open Configuration Manager.
3.      Navigate to Software Library.
4.      Navigate to Application Management.
5.      Navigate to Packages.
6.      Select the Create Package option.
7.      Create a new package with the following options:
Package Info Screen
a.      Name = SCCM-Powershell Test
b.      Language = English
c.      Version = 1
d.      Check mark in the ‘This package contains source files’ box
e.      Source folder = \\server1\ws_psscripts
Program Type Screen
a.      Select ‘Standard Program’
Standard Program Info Screen
a.      Name = PackageTest
b.      Command line:  powershell.exe –executionpolicy bypass –file \\server1\ws_psscripts\packagetest.ps1
c.      Run = Normal
d.      Program can run = Whether or not user is logged on
e.      Run mode:  Run with admin rights
f.      Drive mode = Runs with UNC name
Specify requirements Screen
a.      This program can only run on specified platforms selected, All Windows 7 (64-bit specified)

The package is created successfully.  I then right-click the package and select the ‘Distribute Content’ option.  I add my distribution point and successfully distribute the content.

Once the content is distributed, I right-click the package and select the ‘Deploy’ option.
            General Info Screen
a.      Select my test collection.
Content Destination Page
a.      Verify my distribution point is showing
How Software Deployed Screen
a.      Purpose = Required
b.      Check mark in ‘Send Wake-up packets’
Schedule For Deployment Page
New assignment schedule for made for ‘As soon as possible’ assignment

Once all this has been configured, I wait about 30 minutes and check in with SCCM.  At this point the deployment is showing 100% successful, however when I check my test machine the directory the script should have created is not there.  Can anyone see what I’m doing wrong?

Thanks,
Nick
ASKER CERTIFIED SOLUTION
Avatar of Pankaj Kumar
Pankaj KumarFlag of India imageSystems Specialist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers