首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏Windows技术交流

    Windows云服务器列出Tencent和Red Hat驱动

    Tencent和Red Hat驱动以下代码是我在Server2008R2-2022和Win10、Win11上调试过的,大有用处#列出腾讯的驱动$TencentDrivers = pnputil.exe -e | Select-String -Pattern "Tencent" -Context 1, 0$OEMNumbers = $TencentDrivers.Context.PreContext | Select-String -Pattern $false } if ($found) { Write-Host $line }}#列出红帽的驱动$RedhatDrivers = pnputil.exe -e | Select-String -Pattern "Red Hat" -Context 1, 0$OEMNumbers = $RedhatDrivers.Context.PreContext | Select-String -Pattern

    45010编辑于 2023-12-27
  • 来自专栏Windows技术交流

    powershell2.0的弊端

    -Pattern "Red Hat" -Context 1, 0 $RedHatDrivers1 $OEMNumbers = $RedHatDrivers1.Context.PreContext | Select-String Pattern "Tencent" -Context 1, 0 $TencentDrivers2 $OEMNumbers = $TencentDrivers2.Context.PreContext | Select-String Pattern "Red Hat" -Context 1, 0 $RedHatDrivers1 #$OEMNumbers = $RedHatDrivers1.Context.PreContext | Select-String Matches } | % { $_.Value } $OEMNumbers = $RedHatDrivers1 | ForEach-Object { $_.Context.PreContext } | Select-String " pnputil.exe -f -d $OEMNumber Write-Host "`n`n" } } $TencentDrivers2 = pnputil.exe -e | Select-String

    1.1K00编辑于 2024-06-06
  • 来自专栏全栈工程师修炼之路

    PS常用命令之文件目录及内容操作

    <ip>(\d+\.){3}\d+)'|out-null # 外网地址 $Matches.ip # 120.17.50.229 ---- 0x03 内存字符串处理 Select-String 命令 'Hello', 'HELLO' | Select-String -Pattern 'HELLO' -CaseSensitive -SimpleMatch HELLO # 3.在文本文件中查找匹配项( \Command.txt # Simple Match Select-String -Path .\*.txt -Pattern 'Get-' -SimpleMatch # Alias.txt:8 \Command.txt Select-String -Path . Select-String -Path .

    2K30编辑于 2022-09-29
  • 来自专栏Windows技术交流

    卸载virtio驱动

    dism.exe /online /get-drivers$RedHatDrivers1 = pnputil.exe -e | Select-String -Pattern "Red Hat" -Context 1, 0$RedHatDrivers1#$OEMNumbers = $RedHatDrivers1.Context.PreContext | Select-String -Pattern "oem\d Matches } | % { $_.Value }$OEMNumbers = $RedHatDrivers1 | ForEach-Object { $_.Context.PreContext } | Select-String OEMNumber" pnputil.exe -f -d $OEMNumber Write-Host "`n`n"}}$TencentDrivers2 = pnputil.exe -e | Select-String Pattern "Tencent" -Context 1, 0$TencentDrivers2#$OEMNumbers = $TencentDrivers2.Context.PreContext | Select-String

    43000编辑于 2025-01-16
  • 来自专栏Windows技术交流

    从外平台迁移Windows到腾讯云的校时问题如何解决

    Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force $PVDrivers1 = pnputil.exe -e | Select-String Pattern "PV Driver Developers" -Context 1, 0 $PVDrivers1 #$OEMNumbers = $PVDrivers1.Context.PreContext | Select-String _.Matches } | % { $_.Value } $OEMNumbers = $PVDrivers1 | ForEach-Object { $_.Context.PreContext } | Select-String

    30410编辑于 2025-12-03
  • 来自专栏FreeBuf

    Windows权限维持技巧之隐藏服务

    发现服务不存在 0x04 防御 在通过本文的方法隐藏后,下列方法都无法查询到服务的信息 PS C:\WINDOWS\system32> Get-Service | Select-Object Name | Select-String -Pattern 'test'PS C:\WINDOWS\system32> Get-WmiObject Win32_Service | Select-String -Pattern 'test'PS C:\WINDOWS\system32>sc.exe query | Select-String -Pattern 'test' 如果事先知道服务的名称并拥有服务停止权限,使用Get-Service停止服务会提示无法打开

    2.1K10编辑于 2023-04-26
  • 来自专栏java springboot docker

    k8s安装

    use-context docker-desktop # 获取登录token $TOKEN=((kubectl -n kube-system describe secret default | Select-String

    29610编辑于 2023-03-01
  • 来自专栏Windows技术交流

    Session Manager\SubSystems\Windows键值的SharedSection参数包含三个值,3个值的调整依据是什么

    reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems"|Select-String SharedSection reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems"|select-string

    1.2K10编辑于 2024-04-22
  • PowerShell到底是个啥?跟CMD比起来强在哪里?看完这篇你就懂了

    获取内存信息 Get-WmiObject -Class Win32_PhysicalMemory # 获取磁盘信息 Get-WmiObject -Class Win32_LogicalDisk 文本处理 Select-String (类似grep,这个很重要)在文本中搜索: # 在文件中搜索文本 Select-String -Path "*.log" -Pattern "error" # 搜索多个文件 Get-ChildItem *.txt | Select-String "keyword" 数据筛选和处理 Where-Object(别名:where, ?) \d+" # 在Select-String中使用正则 Get-Content "log.txt" | Select-String "\d{4}-\d{2}-\d{2}" # 替换操作 "Hello

    3.9K10编辑于 2025-11-20
  • 来自专栏jiajia_deng

    Windows Sysinternals 工具自动更新脚本

    Tools = @{} $ToolsPage = $wc.DownloadString($ToolsUrl) $matches=[string] $ToolsPage select-string

    42920编辑于 2023-10-21
  • 来自专栏Java实战博客

    统计项目的代码行数

    例如,对于.cs(C#源文件):(Get-ChildItem -Recurse -Filter *.cs | Select-String .).Count 这会递归地搜索所有.cs文件,并计算行数。

    3.5K10编辑于 2024-01-10
  • 来自专栏小徐学爬虫

    PowerShell部署Windows爬虫自动化方案

    Invoke-WebRequest -Uri $url -UseBasicParsing$content = $response.Content​# 解析数据(示例:提取所有链接)$links = $content | Select-String

    29110编辑于 2025-08-06
  • 来自专栏Khan安全团队

    CVE-2023-24055 PoC(KeePass 2.5x)

    \exploit.xml | Select-String -Pattern Password https://github.com/alt3kx/CVE-2023-24055_PoC

    85820编辑于 2023-02-23
  • 来自专栏dotNET知音

    三分钟Kubernetes-环境搭建篇

    4.创建访问身份验证令牌,在powershel上执行一下脚本: $TOKEN=((kubectl -n kube-system describe secret default | Select-String

    1K20发布于 2020-07-22
  • 来自专栏Python

    Mac OSX系统、Linux、Windows命令行教程

    复制文件或目录 robocopy: 更强大的复制 mv: 移动/重命名文件或目录 more: 按页查看文件 type: 输出整个文件 forfiles: 对大量文件执行一个操作 dir -r: 查找文件 select-string

    3.2K70发布于 2018-01-23
  • 来自专栏Script Boy (CN-SIMO)

    【T1543.003】利用 ACL 隐藏恶意 Windows 服务

    或任何其它关于服务的控制工具均无法检索出对应信息,效果如下: #以下三种查询服务信息的手段均无信息 PS C:\WINDOWS\system32> Get-Service | Select-Object Name | Select-String -Pattern 'SWCUEngine' PS C:\WINDOWS\system32> Get-WmiObject Win32_Service | Select-String -Pattern ' SWCUEngine' PS C:\WINDOWS\system32> & $env:SystemRoot\System32\sc.exe query | Select-String -Pattern

    1.2K10发布于 2020-11-11
  • 来自专栏C语言

    【Story】不同操作系统的命令行命令对比

    -name <文件名> 搜索文件内容 findstr <关键词> <文件> Select-String <关键词> <文件> grep <关键词> <文件> grep <关键词> <文件> 查看网络配置 -sr / sudo pfctl -f /etc/pf.conf 查看日志 eventvwr Get-EventLog journalctl log show 过滤日志 findstr <关键词> Select-String

    88610编辑于 2024-12-11
  • vue报错|NODE_TLS_REJECT_UNAUTHORIZED 警告处理方法

    NODE_TLS_REJECT_UNAUTHORIZED") { Write-Host "找到在文件: $($_.FullName)" -ForegroundColor Red $content | Select-String

    44410编辑于 2025-11-25
  • 来自专栏CSDN技术头条

    现代开发人员必备的十款工具,来看看你漏了啥?

    另外,增加一个像grep(PowerShell中等效的工具是Select-String)这样的工具,这两个工具的功能会变得更强大。 MongoDB:你至少需要知道一个文档数据库的使用方法。

    1.6K80发布于 2018-02-13
  • 来自专栏网络安全技术点滴分享

    红队终端:高级系统枚举与权限提升工具详解

    Format-Table}网络端口扫描函数function Scan-Network { Write-Host "`n[+] 网络扫描(开放端口):" $netstat = netstat -an | Select-String

    20710编辑于 2025-08-23
领券