https://github.com/dahlbyk/posh-git#step-2-import-posh-git-from-your-powershell-profile
$profile.AllUsersCurrentHost
C:Program FilesPowerShell7-previewMicrosoft.PowerShell_profile.ps1
Import-Module 'C:Usersclusource eposGitHubOtherposh-gitsrcposh-git.psd1'
然后把这个文件复制到powershell的路径
phttps://github.com/chucklu/Scripts/blob/master/Powershell/Microsoft.PowerShell_profile.ps1