Windows PowerShell 使用指南:交互式命令行与系统探索
1. Windows PowerShell 基础变量
Windows PowerShell 中有一系列预定义的变量,它们在脚本编写和系统操作中发挥着重要作用。以下是一些常见变量及其描述:
| 变量名 | 描述 |
| ---- | ---- |
| $null | NULL 值 |
| $PID | PowerShell 进程的进程 ID |
| $Profile | 用户配置文件(Profile.ps1)的位置 |
| $ProgressPreference | 指定在传递进度记录时采取的操作 |
| $PSHome | PowerShell 的安装目录 |
| $PWD | 当前工作目录 |
| $ReportErrorShowExceptionClass | 设置为 TRUE (1) 时,显示异常的异常类 |
| $ReportErrorShowInnerException | 设置为 TRUE (1) 时,显示内部异常链 |
| $ReportErrorShowSource | 设置为 TRUE (1) 时,显示异常的程序集名称 |
| $ReportErrorShowStackTrace | 设置为 TRUE (1) 时,显示
超级会员免费看
订阅专栏 解锁全文
154

被折叠的 条评论
为什么被折叠?



