Skip to content

Error when executing PS scrips in Task Sequence

Featured Replies

  •  
I have the following error when I execute my PS script via Run Command Line task in Task Sequence:

Severity Type Site code Date / Time System Component Message ID Description
Error Milestone CS1 3/22/2024 7:33:20 AM MININT-8DHB01O Task Sequence Engine 11135 The task sequence execution engine failed executing the action (Run Command Line - 15) in the group (Install Operating System) with the error code 3221225781 Action output: ... y Bypass -Command "& { [string] $MacAddress = Get-WmiObject Win32_networkadapterconfiguration | where {$_.ipenabled -match 'True'} | select -ExpandProperty MacAddress | select -First 1; $MacAddress = 'PC'+$MacAddress.Replace(':',''); $TSEnv = New-Objct -COMObject Microsoft.SMS.TSEnvironment; $TSEnv.Value('OSDComputerName') = $MacAddress;}"' SwdAction = '0001' Command line for extension .exe is "%1" %* Set command line: Run command line Working dir 'not set' Executing command line: Run command line Process completed with exit code 3221225781 Command line C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& { [string] $MacAddress = Get-WmiObject Win32_networkadapterconfiguration | where {$_.ipenabled -match 'True'} | select -ExpandProperty MacAddress | select -First 1; $MacAddress = 'PC'+$MacAddress.Replace(':',''); $TSEnv = New-Object -COMObject Microsoft.SMS.TSEnvironment; $TSEnv.Value('OSDComputerName') = $MacAddress;}" returned 3221225781. The operating system reported error 1: Incorrect function.


Regards.
Xerkos.

Join the conversation

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

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.