Just ran into similar issue, with same error numbers. Our problem was new boot image that didn't have the powershell optional component. So I added it like in the picture below and it's working fine now.
SCCM task run powershell script fails with not found in X:
I have a few powershell scripts set to run near the end of the sequence but they fail with the message below. That makes me think it is trying to use WinPE to run powershell instead of the local install of the OS. I've also included a screenshot of where it is in the sequence. How to I get it to not use the WinPE environment?
PowerShell.exe does not exist at 'X:\windows\system32\windowspowershell\v1.0\powershell.exe'
Run PowerShell script failed to run, hr=0x80070490. The operating system reported error 2147943568: Element not found.
Microsoft Security Intune Configuration Manager Deployment
Microsoft Security Intune Configuration Manager Other
2 answers
Sort by: Most helpful
-
Toivola Mikko 11 Reputation points
2024-11-08T07:51:39.0533333+00:00 -
CherryZhang-MSFT 6,496 Reputation points
2023-02-08T07:23:38.01+00:00 Hi @Daniel Kaliel,
Please press F8 when the task sequence execution fails to check if it boots to Windows PE. If so, please help check the steps above for running PowerShell script, it may be due to any steps booted it into Windows PE.
This similar threader for your reference:
Looking forward to your feedback.
Best regards
Cherry
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.