codeci
Powershell命令使用
更新时间:2020/10/20 GMT+08:00
Powershell使用操作
如果在构建任务中使用powershell命令,在命令行窗口按如下格式输入命令即可:
powershell –Command Powershell命令参数列表
常用Powershell命令
命令类型 |
说明 |
---|---|
Compress-Archive(压缩命令) |
powershell –Command Compress-Archive -Path [SourcePath] -DestinationPath [Target.zip] |
Expand-Archive(解压缩命令) |
powershell –Command Expand-Archive -Path [SourcePath] -DestinationPath [TargetPath] |
Copy-Item(复制命令) |
powershell –Command Copy-Item -Recurse -Path [SourcePath] -DestinationPath [TargetPath] 说明:
-Recurse选项为循环复制子文件夹,但若在SourcePath中使用了通配符,此开关会失效,不会复制指定目录下的子文件夹。 |
其他命令 |
文档只介绍了构建常用的Powershell命令,更多Powershell命令请参见微软官方文档: https://docs.microsoft.com/zh-cn/powershell/module/cimcmdlets/?view=powershell-5.1 |
父主题: Msbuild构建镜像
