PowerShell

PowerShell

从官方信息梳理10月中旬即将弃用的部分 GitHub Copilot 模型

本文是使用人工智能创作的技术说明和实现示例。虽然所发布的代码和步骤基于一手信息构建,但作者并未在实际设备上进行运行验证。根据环境和版本的不同,运行结果可能会有所差异。本文整理了在使用 GitHub Copilot 时,为安全做好可用 AI ...
PowerShell

使用 PowerShell 观察 Win32 窗口句柄

通过 PowerShell 读取 GUI 进程的 MainWindowHandle,以观察 Win32 的 HWND。
PowerShell

从 PowerShell 直接调用 WinRT —— 使用 PowerManager 观察 Windows 电源状态

这是一个最小的冒烟测试,通过 Windows PowerShell 5.1 直接调用 WinRT 的 PowerManager 来读取剩余电量和电源供电状态。
PowerShell

什么是 Windows 的“窗口句柄”?——从 PowerShell 观察 HWND

通过 PowerShell 读取 MainWindowHandle,观察 Process 与 Win32 窗口之间的关系。
PowerShell

在 PowerShell 中临时修改 PATH — 使用 Process 作用域测试同名 CLI 的查找顺序

无需更改 User/Machine PATH,仅在当前 PowerShell 会话中观察同名 CLI 的查找顺序。
PowerShell

使用 powercfg 读取屏幕关闭时间 —— 将 Windows 设置界面与数值进行对照

从实际业务需求出发,确认如何使用 powercfg 读取屏幕关闭时间。
PowerShell

在 PowerShell 中查看 JSON 的值与类型 —— 通过 ConvertFrom-Json 观察配置

将虚拟 JSON 转换为 PowerShell 对象,并观察不仅限于值本身的类型差异。
PowerShell

从 PowerShell 调用 GetLastInputInfo —— 观察 Windows 距离上次输入已过去的空间闲置时间

通过 PowerShell P/Invoke Win32 GetLastInputInfo,观察距离上一次输入所经过的秒数。
PowerShell

使用 PowerShell 读取 Windows 时区并在 GUI 中进行核对

使用 Get-TimeZone 读取当前时区,并在 Windows 设置界面中安全确认相同的值。
PowerShell

PowerShell + WPF + FileSystemWatcher ― 在界面上观察文件更改事件

这是一个极简的尝试,通过 FileSystemWatcher 接收虚拟文件夹的更改事件,并安全地传递给 WPF 界面。