-1

I am building a simple Powershell script for AD management. I need to run as Admin this script from the .exe file (portable between Domain Controllers and/or Enviroments). Any suggest to make the exe file to request the Admin Privileges to the end-user (PopUp shield "can this program modify...")?

Riccardo
  • 1
  • 1

1 Answers1

1

Consider using ps2exe - https://github.com/MScholtes/PS2EXE This can create an exe from a ps1 file and add things like required admin privilege's etc.

ps2exe .\source.ps1 .\target.exe -requireAdmin
Otter
  • 1,086
  • 7
  • 18