Jump to content


  • 0
KuifJe

Task Sequence and Powershell

Question

Hello all,

 

I have an OSD task sequence deploying Windows Server 2008 R2. All is well, SCCM client gets installed, SCOM agent gets installed, drivers get injected.

 

Now there's also a Powershell script which fails with errorcode 1. For the life of me I haven't found a clue as to where the problem lies.

 

Running SCCM 2007 SP2 R2.

 

The scripts is packed inside a program which will call the following commandline (as administrator):

 

"%windir%\SysWOW64\WindowsPowershell\v1.0\Powershell.exe" -command ".\Script.ps1".

 

Manually running this command in a powershell prompt everything works.

 

I've also incorporated a sytem reboot to the new OS in the Task Sequence so the powershell execution policy gets set to "RemoteSigned" and the program is also copied locally before execution...

 

Any ideas anyone?

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

The script is at the root of the package. The eventual error I got is 0x80070001 which is a file missing error (IIRC).

 

This led me to believe the command wasn't executed directly from the package dir but from System32 or somewhere else. I reconfigured the package to include the complete path to the script (C:\_TaskSequence\etc..) see if that works.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.