PowerShell
PowerShell 相关命令
安装 pwsh
升级 PowerShell
winget 方式
1 | winget search Microsoft.PowerShell |
Iex 方式
1 | iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI" |
查看当前 PowerShell 版本
1 | Get-Host | Select-Object Version |
删除匹配后缀的文件
1 | Remove-Item * -Include *.meta -Recurs |
打开当前文件夹
1 | ii . |
压缩/解压缩
将文件或文件夹 test 压缩为 test .zip
1 | Compress-Archive -Path D:\test -DestinationPath E:\test.zip |
将文件 test .zip 解压到 test 目录下
1 | Expand-Archive -Path E:\test.Zip -DestinationPath F:\test |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 GrayWolf!