![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PowerShell
饥饿的脑子
这个作者很懒,什么都没留下…
展开
-
powershell的压缩和解压
压缩文件:Compress-Archive -Path D:\Tools -DestinationPath E:\Tools_bakcup.zip 解压文件:Expand-Archive -Path E:\Tools_bakcup.zip -DestinationPath F:\Tools 作者:老王生涯 来源:CSDN 原文:https://blog.csdn.net/qq_35436635/...转载 2019-07-02 17:01:52 · 850 阅读 · 0 评论 -
Powershell通过函数扩展别名
使用函数的方式封装方法: 步骤一:function myping { ping www.baidu.com} 步骤二:myping //使用函数 或者 步骤一:function myping { ping $args} 步骤二:myping www.baidu.com ...原创 2019-07-02 11:20:02 · 205 阅读 · 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 · 173 阅读 · 0 评论 -
PowerShell的switch条件使用
测试取值范围 $x=8 switch($x){ {$_ -gt 10} {"大于10"} 10 {"等于10"} {$_ -lt 10} {"小于10"} } 没有匹配 $x=8 switch($x){ {$_ -gt 10} {"大于10"} 10 {"等于10"} default {"没有匹配的"} } 只匹配一次 $x=8 switch($x){ {$_ -lt 8} {"...转载 2019-07-03 14:20:59 · 1267 阅读 · 0 评论