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
Post a Comment