按使用场景分组,点击"复制"按钮一键复制命令
Get-Process
Get-Process -Name <name>
Stop-Process -Name <name> -Force
Get-Service
`Start-Service <svc>` / `Stop-Service <svc>`
Restart-Service <svc>
`Get-ChildItem`(别名 `ls`)
`Set-Location <path>`(别名 `cd`)
Get-Content <file>
`New-Item -ItemType Directory <path>` / `New-Item -ItemType File <file>`
Copy-Item <src> <dst> -Recurse
Move-Item <src> <dst>
Remove-Item <path> -Recurse -Force
Test-Path <path>
systeminfo
hostname
$env:PATH
$env:PATH += ";<dir>"
Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned
chcp 65001
netstat -ano
`netstat -ano
taskkill /PID <pid> /F
Test-NetConnection <host> -Port <port>
Resolve-DnsName <domain>
ipconfig
Compress-Archive -Path <src> -DestinationPath <out.zip>
Expand-Archive -Path <file.zip> -DestinationPath <dir>
`Get-PSDrive <drive-letter>`(如 `Get-PSDrive C`)
chkdsk C: /F