0

I'm trying to run a PowerShell script using unattend.xml file for Windows Server 2012 R2 setup. I specified that PowerShell file to execute at specialise pass stage. Please check the below unattended script for PowerShell.

powershell.exe -executionpolicy bypass -noprofile -File "\\192.168.3.5\deploy\demo.ps1"

Everytime when I ran the setup using the unattended file it skips the PowerShell execution with the error. I have checked unattended log and found the below error code for the powershell execution.

Process returned with exit code 0xfffd0000

I have full control to the network shared path. Any idea on this?

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • 2
    Is the guest account enabled? That is required for unauthenticated access to a share. To avoid enabling that, you could move it to the oobe stage at which point it should prompt for credentials. – Patrick Meinecke Aug 10 '16 at 04:45
  • Thanks Patrick. I tried to execute the script after enabled the guest user in remote share server. But still getting the error with the same error code 0xfffd0000. – Lokeswaran T Aug 10 '16 at 06:21
  • And `Everyone` has read permission to the share? If so, can you try moving it to the oobe stage to see if it prompts for credentials? – Patrick Meinecke Aug 10 '16 at 12:39
  • Patrick, here is my permission detais C:\Users\Administrator>cacls d:\deploy d:\Deploy Everyone:(OI)(CI)F NT AUTHORITY\SYSTEM:(OI)(CI)F NT AUTHORITY\NETWORK SERVICE:(OI)(CI)F SSD\Administrator:(OI)(CI)F (OI)(CI)F BUILTIN\Administrators:(OI)(CI)F SSD\Guest:(OI)(CI)C I need to run few scripts before oobestage, so that I'm trying in speclialize pass. Is there any prerequisites should i need to enable in the network share server before executing the powershell script? – Lokeswaran T Aug 11 '16 at 02:35
  • What about the permissions for the share? Does `Everyone` have access there? If that's the case then I'm not sure exactly. Also I'm not recommending a permanent move for the script to go to oobe, just a suggestion for troubleshooting. – Patrick Meinecke Aug 11 '16 at 15:24
  • Everyone has full permission for shared folder. And able to access the shared from other machines without password prompt. But unable to access the network share powershell scripts through powershell.exe. I will move the script to oobe section. Thanks for your help patrick :-) – Lokeswaran T Aug 15 '16 at 09:34

1 Answers1

0

One Year Later: I believe the error to be related to the "location" or Domain of the account being used. Depending on how you reference the account in your script, you may need to add the domain prefix or suffix to set the location context for the account referenced in the script DOM\username or username@domain.local