会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
aidehuapaopao
博客园
首页
新随笔
联系
订阅
管理
2022年4月
powershell修改目录下所有文件夹名
摘要: Get-ChildItem C:\1\clients\* -Recurse|Where-Object {$_.name -match "history"}| rename-item -NewName 'history_report'
阅读全文
posted @ 2022-04-21 02:13 aidehuapaopao
阅读(168)
评论(0)
推荐(0)
2022年3月
powershell 卸载whindwsfeature
摘要: Uninstall-WindowsFeature –Name <feature_name> -ComputerName <computer_name> -Restart
阅读全文
posted @ 2022-03-14 23:41 aidehuapaopao
阅读(62)
评论(0)
推荐(0)
2022年2月
powershell暂停当前进程 15 秒,暂停当前进程 500 毫秒。
摘要: Start-Sleep -s 15 Start-Sleep -m 500
阅读全文
posted @ 2022-02-22 19:57 aidehuapaopao
阅读(268)
评论(0)
推荐(0)
powershell 对某个对象排序
摘要: Get-Process | Sort-Object -Property WS | Select-Object -Last 5
阅读全文
posted @ 2022-02-22 19:56 aidehuapaopao
阅读(24)
评论(0)
推荐(0)
powershell更改时间(单位天)
摘要: set-date -Date (Get-Date).AddDays(1) set-date -Date (Get-Date).AddDays(-1)
阅读全文
posted @ 2022-02-22 19:49 aidehuapaopao
阅读(160)
评论(0)
推荐(0)
powershell远程传文件
摘要: $s=new-pssession -computername servername Copy-Item -Path c:\ibm\a.txt -Destination c:\ibm\a.txt -Recurse -Force -ToSession $s
阅读全文
posted @ 2022-02-18 18:16 aidehuapaopao
阅读(162)
评论(0)
推荐(0)
powershell查安装信息
摘要: $path = "$env:windir\System32\Winevt\Logs\Setup.evtx" Get-WinEvent -Path $path
阅读全文
posted @ 2022-02-18 12:50 aidehuapaopao
阅读(59)
评论(0)
推荐(0)
2021年12月
powershell 正则表达式 -match
摘要: -match(正则表达式) 使用 -match 运算符可以检查字符串中是否有基于正则表达式的匹配项。 当你觉得通配符模式不够灵活时,请使用此模式。 PowerShell $value = 'S-ATX-SQL01' if ( $value -match 'S-\w\w\w-SQL\d\d') { #
阅读全文
posted @ 2021-12-17 22:38 aidehuapaopao
阅读(873)
评论(0)
推荐(0)
powershell 通配符 -like
摘要: -like(通配符匹配) PowerShell 具有其自己的通配符模式匹配语法,你可以将其与 -like 运算符一起使用。 这些通配符模式都非常基本。 ? 匹配任何单个字符 * 匹配任意数量的字符 PowerShell $value = 'S-ATX-SQL01' if ( $value -like
阅读全文
posted @ 2021-12-17 22:37 aidehuapaopao
阅读(769)
评论(0)
推荐(0)
powershell 运算符大于小于-gt -ge -lt -le
摘要:
阅读全文
posted @ 2021-12-17 17:40 aidehuapaopao
阅读(345)
评论(0)
推荐(0)
下一页
公告