Reputation: 205
i'm running powershell script within my ASP MVC5 application which is the following
schtasks.exe /change /tn TestTask /sd 10/05/2015
I need to know how to give my hosted application in SERVER1 privileges through IIS 7.5 to edit this task from web page.
Upvotes: 0
Views: 353
Reputation: 3048
You can pass to schtasks.exe the credentials of a user that has the necessary privileges. See /u
and /p
parameters.
This would be, by far, less invasive than changing the application pool identity.
Upvotes: 1
Reputation: 3138
You can run your website under any user that you wish. Just go to Application Pool and define the site should be running by which user. For more info you can check this link: Specify an Identity for an Application Pool
Then you can get enough privileged to that user to run Powershell shell script
https://technet.microsoft.com/en-us/library/hh849812.aspx
Upvotes: 1