I am having below line of code which is part of my build process. Below code take SectionName and dotnet framework path for aspnet_regiis and encryption flag -pef to encrypt my web.config.
So when build happens i need to run the below code "Run as administrator" for that i used start-process with powershell and -Verb runas option. But when run this script i get a prompt in windows 10 with yes or no option.
How to avoid this.
$args="-pef '${SectionName}' '${configfilepath}'"
Start-process powershell -Verb runas "$(join-path ${frameworkPath} 'aspnet_regiis.exe') ${args}"