| 用途 | 统一访问异构数据存储 |
|---|---|
| 语法 | Get-PSDrive;cd HKLM:\SOFTWARE;Get-ChildItem Cert:\LocalMachine\Root |
| 常用驱动器 | FileSystem、注册表 HKLM:/HKCU:、Cert: 证书、Env: 环境变量 |
常用示例
常用示例
Get-PSDrive
Get-ChildItem HKCU:\Software | Select-Object -First 5
Get-ChildItem Cert:\LocalMachine\My -CodeSigningCert注册表值用 Get-ItemProperty 读取;递归搜索注意权限报错,可加 -ErrorAction SilentlyContinue。