示例 PSC:\Users\admin>Get-Module-ListAvailable 目录: C:\Program Files\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands---Script 1.0.1 Microsoft.PowerShell.Operation.V...{Get-OperationValidat...Binary 1.0.0.1 PackageManagement{Find-Package,Get-Pa...Script 3.4.0 Pester{Describe,C...
PowerShell 复制 Find-Module -Name PowerShellGet | Install-Module 使用Find-ModuleName 参数指定 PowerShellGet 模块。 默认情况下,从存储库下载模块的最新版本。 该对象将管道向下发送到 Install-Module cmdlet。 Install-Module 为所有用户 $env:ProgramFiles\PowerShell\Modules安装该模块。示例...
Get-Module查找由$Env:PSModulePath环境变量指定的路径中的可用模块。 有关PSModulePath的详细信息,请参阅about_Modules和about_Environment_Variables。 示例3:获取所有导出的文件 PowerShell Get-Module-ListAvailable-All 此命令获取所有可用模块的所有导出文件。
Get-Module 會在$env:PSModulePath 環境變數所指定的路徑中尋找可用的模組。 如需 PSModulePath 的詳細資訊,請參閱 about_Modules 和about_Environment_Variables。範例3:取得所有導出的檔案PowerShell 複製 Get-Module -ListAvailable -All此命令取得所有可用模組的所有匯出檔案。
Get-Module-ListAvailable 模块加载位置: Powershell从PSMDULEPATH环境变量中查找模块加载的位置 $env:PSMODULEPATH 使用分割符进行分割 $env:PSModulePath-split';' 导入模块# Import-Module 导入指定名称的模块(默认从$PSMODULEPATH加载) Import-Module-NamePSWorkflow ...
To obtain a listing of all modules that are available on the system but are not loaded into the Windows PowerShell console, you can use the Get-Module cmdlet with theListAvailableparameter, as shown here: PS C:\> Get-Module –ListAvailable ...
Find-Module-NamePowerShellGet-RepositoryPSGallery-RequiredVersion1.6.5|Save-Module-PathC:\Test\ModulesGet-ChildItem-PathC:\Test\Modules\PowerShellGet Directory: C:\Test\Modules\PowerShellGet Mode LastWriteTime Length Name --- --- --- --- d---7/1/201914:041.6.5 Find-Moduleuses theNameparame...
If no modules are loaded, nothing is displayed to the Windows PowerShell console (no errors are displayed, and there is no confirmation that the command was actually run).To obtain a listing of all modules that are available on the system but are not loaded into the Windows PowerShell ...
If there are multiple modules loaded that contain the same cmdlet name, PowerShell uses the cmdlet from the first module found alphabetically. If the cmdlet isn't loaded, PowerShell searches the installed modules and autoloads the first module that contains the cmdlet and runs that cmdlet. ...
'PowerShellGet'. Try Get-PSRepository to see all available registered module repositories. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters ...