2

I have a question about running a powershell script as a task sepeunce. My .ps1 file contains the following script:

powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

I put the file on C:\users\desktop on the mdt server. Now I try to create a task sequence to execute the script for new devices.

When I fill in powershell.exe -file "%ScriptRoot%\energie_highest.ps1" and %ScriptRoot% the task sequence is getting a failure.

I'm still an IT-trainee. So what did I made wrong?

Task Sequence

Ala
  • 23

1 Answers1

0

%scriptroot% is not a valid parameter. You could use %userprofile% or any other variable you see when typing set

LPChip
  • 66,193