PowerShell 常用命令

远程文件下载

powershell -c "(new-object System.Net.WebClient).DownloadFile('http://192.168.2.210:8000/index.html','C:\Users\huanmsf\Desktop\index.html')"

服务管理

Get-Service -Name se*
Stop-Service -Name spooler
Restart-Service -Name spooler
Get-Service | Where-Object -FilterScript {$_.CanStop} | Restart-Service

posted @ 2021-04-20 21:30  懒企鹅  阅读(122)  评论(0编辑  收藏  举报