Ngoài câu trả lời Mathias.
Mặc dù không được đề cập trong OP, nhưng nếu bạn cũng cần xem các biến nội bộ cụ thể / liên quan đến Powershell , bạn cần sử dụng Get-Variable
:
$ Get-Variable
Name Value
---- -----
$ name
? True
^ gci
args {}
ChocolateyTabSettings @{AllCommands=False}
ConfirmPreference High
DebugPreference SilentlyContinue
EnabledExperimentalFeatures {}
Error {System.Management.Automation.ParseException: At line:1 char:1...
ErrorActionPreference Continue
ErrorView NormalView
ExecutionContext System.Management.Automation.EngineIntrinsics
false False
FormatEnumerationLimit 4
...
Chúng cũng bao gồm những thứ bạn có thể đã đặt trong tập lệnh khởi động hồ sơ của mình.
echo $env:Path