0

I want to execute a batch file from powershell or command line, but it needs to execute with administrative credentials.

Is there a way to pass the administrative credentials as an argument in command line/powershell to execute batch file? I tried to use -Credential new-object but it prompt the credentials popup on the screen

Shrikant
  • 21
  • 4
  • To answer your question. It is YES. But you can use the `runas` also. Show your code mate. – Ranadip Dutta Jan 22 '18 at 12:31
  • There are some cmdlets supporting the parameter -Credential but the actual challenge is to pass the credentials securely to the cmdlets. – Olaf Jan 22 '18 at 12:40

0 Answers0