2
PowerShell有一个名为$ShellId
的内置变量。它在#Requires
documentation中提到,它是RunspaceConfiguration
的财产。但是我找不到有关它应该做什么的文档。我可以在#Requires
声明中指定它的事实表明它有一些预期的目的,但我找不到什么。什么是ShellId?我为什么需要它?
$ShellId
的用途是什么?在什么情况下,我会使它成为我的脚本的依赖项?
请参阅[本文](https://www.simple-talk.com/sysadmin/powershell/persistent-powershell-the-powershell-profile/)。 – wOxxOm