PowerShell 模块存储在哪里?
PowerShell 模块存储在其模块路径中。可以使用环境变量 $env:PSModulePath 检索模块路径。为获得更清晰的展示,我们使用分号分割变量路径。
$env:PSModulePath -split ';' C:\Users\Administrator\Documents\WindowsPowerShell\Modules C:\Program Files\WindowsPowerShell\Modules C:\Windows\system32\WindowsPowerShell\v1.0\Modules
您可以查看上述 3 条路径。每条路径的模块存储都是根据其作用域进行的。
文档路径:当您在安装模块时提供作用域 – CurrentUser,模块将存储在此路径中。
程序文件路径:当提供作用域AllUsers 时,模块将存储在此路径中。
System32 路径:这是模块的默认路径。每当 Microsoft 更新任何 PowerShell 版本或模块时,都会将该更新安装在此位置。
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP