3

I'm working on a SCCM OSD task sequence using a package and the 'run powershell script' option in the task sequence. I need to have the script prompt for user input. If I run the script using the F8 debug console everything works exactly right.

How can I have it display so this is possible?

Tim Brigham
  • 15,545
  • 10
  • 75
  • 115
  • Is this an OSD task sequence? OSD task sequences are specifically designed so that user-input isn't possible, as it's supposed to be completely automated, but there are potential work-arounds. This article was written for SCCM 2007 but also applies to SCCM 2012: http://blogs.technet.com/b/cameronk/archive/2011/01/25/can-i-use-serviceui-exe-to-launch-other-programs-besides-the-udi-setup-wizard.aspx – ethinton Oct 06 '15 at 12:56
  • Thanks EthanHinton - that's the same basic solution that I came up with. – Tim Brigham Oct 06 '15 at 15:10

1 Answers1

3

The same basic premise as mentioned by Ethan Hinton above worked well. In my case I already have a mapped drive (U:) in use so the following worked. Ideally I'd like to convert the following to avoid needing the mapped drive.

U:\ServiceUI.exe -process:tsprogressui.exe X:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted U:\DriverSelect_Run_Local.ps1

EDIT:

I put together a blog post that outlines the basics of how to wrap this up effectively in a portable SCCM Package.

It basically makes use of a similar wrapper script (source below) and a specific set of options on the package / task sequence.

See here for the article.

 param ( $script )
 .\ServiceUI.exe -process:tsprogressui.exe \      
  X:\Windows\System32\WindowsPowershell\v1.0\powershell.exe \
  -ExecutionPolicy Unrestricted $script
Tim Brigham
  • 15,545
  • 10
  • 75
  • 115