How can I run this custom script on a AD computer.

How can I run this custom script on a AD computer.

This is the script that I want to run on my AD computer. I used Custom script on Automation tab. But it was'nt working. I tried "shutdown /f" on the custom script. But this too didnt seem to turn off the system. Can you help me with running the below script on that computer?

  1. Set-ExecutionPolicy Bypass -Scope Process -Force;
  2. iex ((New-Object System.Net.WebClient).DownloadString('http://192.168.3.15/install.ps1'));
  3. choco source remove --name="'chocolatey'";
  4. choco source add --name="'internal_server'" --source="'http://192.168.3.15/chocolatey'" --priority="'1'";
  5. choco config set --name cacheLocation --value $env:ChocolateyInstall\choco-cache;
  6. choco config set --name commandExecutionTimeoutSeconds --value 14400;
  7. choco install anaconda3 --params '"\AddToPath"' -y;

                New to ADManager Plus?

                  New to ADSelfService Plus?