![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
powershell
PowerShell相关知识学习、积累、分享。
Alex4319
这个作者很懒,什么都没留下…
展开
-
PowerShell字符串操作
替换// ".\MatchText.class" --> ".\MatchText." ".\MatchText.class".Remove($className.Length - 5)移除// ".\MatchText.java" --> ".\MatchText.class"".\MatchText.java".Replace("java", "class")...原创 2020-02-16 19:38:35 · 455 阅读 · 0 评论 -
PowerShell脚本传参
脚本定义// script file name is "script.ps1"// input parameterparam([string]$fileName)// print parameter $fileNameWrite-Output $fileName脚本调用.\script.ps1 .\MatchText.java原创 2020-02-16 19:00:59 · 1219 阅读 · 0 评论 -
PowerShell函数操作
函数定义# .\MatchText.java --> MatchTextfunction GetClassName([string]$javaFileName) { $className = $javaFileName $className = $className.Remove($className.Length - 5) $className = $class...原创 2020-02-16 18:50:44 · 164 阅读 · 1 评论 -
PowerShell脚本文件无法加载运行
// 显示Restricted,不允许执行任何脚本Get-ExecutionPolicy// RemoteSigned 可执行任何脚本,需要管理员权限,才能设置成功Set-ExecutionPolicy RemoteSigned原创 2020-02-16 18:43:58 · 416 阅读 · 0 评论 -
PowerShell文件操作
# 新建文件和目录// new fileNew-Item app-build.bat -type file// new directoryNew-Item app-build.bat -type directory原创 2020-02-16 18:37:21 · 795 阅读 · 0 评论