随笔分类 -  Powershell

摘要:拓展 之前文章 阅读全文

posted @ 2019-03-20 21:33 努力成长静待花开 阅读(812) 评论(0) 推荐(0)

摘要: 阅读全文

posted @ 2019-03-19 22:26 努力成长静待花开 阅读(223) 评论(0) 推荐(0)

摘要:问题症状: 实现要求: 可以代替手动查找 可以递归 实现代码: 效果演示: 阅读全文

posted @ 2019-03-18 19:32 努力成长静待花开 阅读(259) 评论(0) 推荐(0)

摘要:#开启DHCP协议 Get-NetIPInterface -Dhcp Disabled|Set-NetIPInterface -Dhcp Enabled #开启本机上所有博通网卡的DHCP Get-WmiObject -Class win32_networkadapterconfiguration 阅读全文

posted @ 2019-03-17 13:12 努力成长静待花开 阅读(562) 评论(0) 推荐(0)

摘要:查看网络接口信息: 对WLAN接口进行高优先调整: set-NetIPInterface -ifIndex 6 -InterfaceMetric 1 恢复系统自动调整(默认)模式: set-NetIPInterface -ifIndex 6 -AutomaticMetric Enabled 阅读全文

posted @ 2019-03-16 19:57 努力成长静待花开 阅读(867) 评论(0) 推荐(0)

摘要:反转效果: 实现方法: $con=gc .\poetry.txt$con.Length..1|%{$con[$_-1]} $con=gc .\poetry.txt[System.Array]::Reverse($con)$con 阅读全文

posted @ 2019-03-16 15:30 努力成长静待花开 阅读(182) 评论(0) 推荐(0)

摘要:现有以下数据需要去重: 192.168.131.21192.168.131.43192.168.131.17192.168.131.18... ...192.168.131.18 使用sort和select分别完成: 补充:sort 和 select 各有所长,按需选取最宜 阅读全文

posted @ 2019-03-15 21:58 努力成长静待花开 阅读(137) 评论(0) 推荐(0)

摘要:获取控制面板项: “Get-ControlPanelItem” 打开鼠标属性界面: "Show-ControlPanelItem -can *Mouse" 打开面板所有项目 “Show-ControlPanelItem|Show-ControlPanelItem” 阅读全文

posted @ 2019-03-15 21:39 努力成长静待花开 阅读(146) 评论(0) 推荐(0)

摘要:方法一: Get-WmiObject -ClassName Win32_PnPEntity|where{$_.status -eq "error"} #显示被禁用的设备 Get-WmiObject -ClassName Win32_PnPEntity|where{$_.status -eq "err 阅读全文

posted @ 2019-03-14 22:48 努力成长静待花开 阅读(251) 评论(0) 推荐(0)

摘要:本例以禁用网络适配器中的Ipv6为例: 阅读全文

posted @ 2019-03-14 13:07 努力成长静待花开 阅读(340) 评论(0) 推荐(0)

摘要:Membership.GeneratePassword(Int32, Int32) //生成指定长度的随机密码 Add-Type -AssemblyName system.web [System.Web.Security.Membership]::GeneratePassword(10,5) 1.. 阅读全文

posted @ 2019-03-13 19:23 努力成长静待花开 阅读(524) 评论(0) 推荐(0)

摘要:在磁盘管理中操作 使用Diskpart工具 Cmdlet命令 阅读全文

posted @ 2019-03-12 13:43 努力成长静待花开 阅读(361) 评论(0) 推荐(0)

摘要: 阅读全文

posted @ 2019-03-11 13:02 努力成长静待花开 阅读(284) 评论(0) 推荐(0)

摘要:关于Resolve-Path的使用 在所有用户桌面创建一个txt文件内容为zhiding 阅读全文

posted @ 2019-03-10 21:49 努力成长静待花开 阅读(168) 评论(0) 推荐(0)

摘要:获取本地IP地址 得到远程机IP地址与描述 若仅仅是查看IP地址 阅读全文

posted @ 2019-03-07 13:10 努力成长静待花开 阅读(366) 评论(0) 推荐(0)

摘要:实现效果: 实现代码: 阅读全文

posted @ 2019-03-06 19:30 努力成长静待花开 阅读(449) 评论(0) 推荐(0)

摘要:实现效果: 实现代码: 阅读全文

posted @ 2019-03-05 19:45 努力成长静待花开 阅读(823) 评论(1) 推荐(0)

摘要:简单使用 执行支持-ComputerName参数的命令 指定脚本文件与凭证 阅读全文

posted @ 2019-03-04 21:19 努力成长静待花开 阅读(188) 评论(0) 推荐(0)

摘要:计算正在使用的虚拟内存的十大进程占用 的虚拟内存总量 步骤如下: 阅读全文

posted @ 2019-03-02 20:35 努力成长静待花开 阅读(179) 评论(0) 推荐(0)

摘要: 阅读全文

posted @ 2019-03-01 22:07 努力成长静待花开 阅读(168) 评论(0) 推荐(0)