xxxxxxxxxx
# In your powershell 7 as admin do:
Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force
Update-Module PowerShellGet -Force
# Install-Module Posh-Git -Scope LocalMachine // if errors
Install-Module Posh-Git -Scope LocalMachine
# Install-Module Posh-Git // if errors
notepad $PROFILE
# New-Item -Path $PROFILE -Type File -Force // if errors
# add this
'Import-Module Posh-Git' | Out-File -Append -Encoding default -FilePath $profile