Powershell basic

From malue-ai/dazee-small · View interactive version

Powershell basic is an AI agent skill from the GitHub repository malue-ai/dazee-small. Execute PowerShell commands on Windows for system info, file operations, process management, and automation.

How to use this skill

Skill file

PowerShell 基础

通过 PowerShell 执行 Windows 系统操作。

使用场景

命令参考

系统信息

# 系统概览
Get-ComputerInfo | Select-Object OsName, OsVersion, CsTotalPhysicalMemory

# 磁盘空间
Get-PSDrive -PSProvider FileSystem | Select-Object Name, @{N='Free(GB)';E={[math]::Round($_.Free/1GB,1)}}, @{N='Used(GB)';E={[math]::Round($_.Used/1GB,1)}}

# 内存使用
Get-Process | Sort-Object WorkingSet64 -Descending | Select-Object -First 10 Name, @{N='Memory(MB)';E={[math]::Round($_.WorkingSet64/1MB,1)}}

# 电池状态
Get-WmiObject Win32_Battery | Select-Object EstimatedChargeRemaining, BatteryStatus

# Wi-Fi 信息
netsh wlan show interfaces | Select-String "SSID|Signal"

文件操作

# 搜索文件
Get-ChildItem -Path "$env:USERPROFILE\Documents" -Recurse -Filter "*.pdf" | Select-Object Name, FullName, Length, LastWriteTime

# 按大小排序
Get-ChildItem -Path . -Recurse -File | Sort-Object Length -Descending | Select-Object -First 20 Name, @{N='Size(MB)';E={[math]::Round($_.Length/1MB,2)}}, FullName

# 最近修改的文件
Get-ChildItem -Path "$env:USERPROFILE" -Recurse -File | Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) } | Sort-Object LastWriteTime -Descending | Select-Object -First 20

# 批量重命名
Get-ChildItem -Path . -Filter "*.txt" | Rename-Item -NewName { $_.Name -replace '旧名', '新名' }

进程管理

# 列出进程
Get-Process | Sort-Object CPU -Descending | Select-Object -First 15 Name, Id, CPU, @{N='Memory(MB)';E={[math]::Round($_.WorkingSet64/1MB,1)}}

# 查找进程
Get-Process -Name "*chrome*"

# 已安装应用
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher | Sort-Object DisplayName

网络

# 测试连通性
Test-NetConnection -ComputerName google.com -Port 443

# 公网 IP
(Invoke-WebRequest -Uri "https://api.ipify.org" -UseBasicParsing).Content

安全规则

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.