r/SCCM•
erbler

Task Sequence Can’t Do ‘Run Powershell Script’ Actions

Hi all. Im still somewhat new to writing task sequences. I’m trying to write a Windows 11 IPU Task Sequence, and I’m having problems running Run Powershell Script actions. I think the security agents in my environment prevent Powershell scripts from running inside the C:\Windows\Temp(something) folder where it temporarily stages the PS scripts (it names it as {random guid}.ps1). This causes my TS to fail.

There are various folders with exceptions from the security agents. Is there someway I can force the Run PowerShell script actions to stage the scripts to one of these exception folders? Even if it’s a sub folder, that’s fine as the exceptions are for the folder and sub folders. There’s nothing in the action that lets me specify where to put the temporary scripts. I know I can make a package of PS scripts and run them from there, but being able to use the action is far faster and easier from a development and maintenance standpoint. Any ideas?

All help is greatly appreciated, thanks in advance!

Posted Jul 4, 2024, 1:38 PM UTC

38

Comments aren't archived yet

This post had 8 comments on Reddit. Comments for this period haven't been loaded into the archive yet.