Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

how to run as admin powershell.ps1 file calling in batch file

$
0
0

I prepared one batch file .that file contains powershell file complete path to execute .

i want to execute this powershell file as run as administrator.

 

My batch file contains below text

powershell .\psfile.ps1

the above .bat file working fine on my dev box in which I'm having admin rights. But on some other env if i run the .ps1 file from power shell cmd prompt with administrator ,its working fine.


Srikanth Peddy. MCTS-BizTalk Server Please mark as answered .

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>