scripting - Batch script network file -


i have batch script trying open file (powershell script on network location). if put path local c:\test.ps1 works fine cant seem work network file structure.

@echo off  (set/p adminuser=enter admin account: )  runas /user:%userdomain%\%adminuser% "powershell "\\server\share$\it support\test\test share\test.ps1""  

any ideas?

thanks.

try this:

@echo off  (set/p adminuser=enter admin account: )  runas /user:%userdomain%\%adminuser% "powershell -noexit & '\\server\share$\it support\test\test share\test.ps1'" 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -