permissions - How can I run this Powershell script as a user? -


i trying run following script upon startup of machine because cannot service start on startup. can schedule run. problem facing seems user vs administrator issue.

this windows 7 machine powershell 4.0. have set execution policy unrestricted. when try run script user designated have administrative privileges see following error.

enter image description here when right click powershell icon, run administrator command works fine. command

 get-service -name "*vmauthd*" |start-service 

is possible run user account?

solution able script run on startup desired. turned off uac , set execution policy unrestricted. not sure if uac issue before script runs now. created cmd file in code. set cmd file run @ startup using windows task scheduler , set task run whether logged in or not.

powershell -command "set-executionpolicy unrestricted"

powershell -command "get-service -name "vmauthd" | start-service"

pause

here image of cmd file


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -