powershell
Powershell后缀powershell文件后缀为*.ps1
批量重命名文件-replace可使用正则表达式
注意必须使用单引号
1234Get-ChildItem -Filter "*.txt" -File | ForEach-Object{ $newname = $_.Name -replace '-(.*)-', '$1' Rename-Item $_.FullName $newname}
统计统计行数Measure-Object -Line
1ls|findstr "cgr" |Measure-Object -Line
统计字符数Measure-Object -Character
字数Measure-Object -Word
获取文件内容Get-Content
1Get-Content .\pom.xml
发送请求1234567891011121314151617echo "mantain wifi"if ( Test-Connectio ...