Get-Module
~\Desktop> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------Manifest 6.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty...}Manifest 6.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}Script 1.0.0.0 posh-git {Add-PoshGitToProfile, Expand-GitCommand, Format-GitBranchName, Get-GitBranchStatusColor...}Script 2.0.0 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKeyHandler, Set-PSReadLineKeyHandler...}
Find-Module
Finds modules from an online gallery that match specified criteria.
Install-Module
Downloads one or more modules from an online gallery, and installs them on the local computer.
Import-Module
Adds modules to the current session.
The Import-Module cmdlet adds one or more modules to the current session.
The modules that you import must be installed on the local computer or a remote computer.
Import-Module imports a module only into the current session.
To import the module into all sessions, add an Import-Module command to your PowerShell profile.
For more information about profiles, see .
$PROFILE
C:\Users\clu\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
文件内容
Import-Module 'C:\Users\clu\source\repos\GitHub\Other\posh-git\src\posh-git.psd1'
Import-Module 'C:\Users\clu\source\repos\GitHub\Other\PowerShell\build.psm1'