码迷,mamicode.com
首页 > 其他好文 > 详细

powershell.exe直接运行命令

时间:2014-08-28 14:39:59      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:ar   文件   log   amp   sp   c   app   file   bs   

powershell.exe -Command "& { (‘time={0},user={1}‘ -f (get-date),(whoami)) | Out-File "d:\user.log" -Append }"

 

给.exe文件添加参数,参数是 array 格式

$argus = "$env:windir\", ‘c:\jpegs\‘,‘*.jpg‘, ‘/R:0‘, ‘/S‘, ‘/XD‘, ‘*winsxs*‘
Robocopy.exe $argus

powershell.exe直接运行命令

标签:ar   文件   log   amp   sp   c   app   file   bs   

原文地址:http://www.cnblogs.com/dreamer-fish/p/3941487.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!