首页 > 系统服务 > 详细

32. PowerShell -- 批处理中执行远程的powershell脚本的方法

时间:2015-05-08 00:19:46      阅读:265      评论:0      收藏:0      [点我收藏+]
  1. Copy powershell.ps1 from \\fileserver\scripts  to  "%systemdrive%\Tools\Scripts" local computer;

    REM powershell.ps1 file
    robocopy \\filerserver\Scripts %systemdrive%\Tools\Scripts powershell.ps1

     

  2. Execute the powershell.ps1 file

    REM Execute  powershell.ps1 file
    powershell -ExecutionPolicy RemoteSigned "%systemdrive%\Tools\Scripts\powershell.ps1

本文出自 “Ricky's Blog” 博客,请务必保留此出处http://57388.blog.51cto.com/47388/1643904

32. PowerShell -- 批处理中执行远程的powershell脚本的方法

原文:http://57388.blog.51cto.com/47388/1643904

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!