
PowerShell
饥饿的脑子
这个作者很懒,什么都没留下…
展开
-
PowerShell的switch条件使用
测试取值范围$x=8switch($x){ {$_ -gt 10} {"大于10"} 10 {"等于10"} {$_ -lt 10} {"小于10"}}没有匹配$x=8switch($x){ {$_ -gt 10} {"大于10"} 10 {"等于10"} default {"没有匹配的"}}只匹配一次$x=8switch($x){ {$_ -lt 8} {"...转载 2019-07-03 14:20:59 · 1323 阅读 · 0 评论 -
PowerShell的对象创建
创建对象$mytest=new-object object$mytest显示:System.Object增加属性$mytest | add-member noteproperty Name "test1"$mytest | add-member noteproperty Age 3$mytest | add-member noteproperty Height 1.89$myt...原创 2019-07-03 11:01:25 · 249 阅读 · 0 评论 -
powershell的压缩和解压
压缩文件:Compress-Archive -Path D:\Tools -DestinationPath E:\Tools_bakcup.zip解压文件:Expand-Archive -Path E:\Tools_bakcup.zip -DestinationPath F:\Tools作者:老王生涯来源:优快云原文:https://blog.youkuaiyun.com/qq_35436635/...转载 2019-07-02 17:01:52 · 920 阅读 · 0 评论 -
Powershell通过函数扩展别名
使用函数的方式封装方法: 步骤一:function myping { ping www.baidu.com} 步骤二:myping //使用函数 或者 步骤一:function myping { ping $args} 步骤二:myping www.baidu.com...原创 2019-07-02 11:20:02 · 269 阅读 · 0 评论