title: Errors when starting a PowerShell session
body: <p>I was using <code>PowerShell</code> normally (was using <code>posh git</code>, just to mention), and suddenly a weird behavior happened, I tried to restart the session, when I did, I got many errors, which are :</p>
  
  <pre><code>Split-Path : The term 'Split-Path' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
  was included, verify that the path is correct and try again.
  At C:\Users\aymen.daoudi\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1:1 char:16
  + Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -P ...
  +                ~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Split-Path:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  
  Import-Module : The specified module '.\posh-git' was not loaded because no valid module file was found in any module directory.
  At C:\Users\aymen.daoudi\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1:4 char:1
  + Import-Module .\posh-git
  + ~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ResourceUnavailable: (.\posh-git:String) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
  
  Enable-GitColors : The term 'Enable-GitColors' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
  if a path was included, verify that the path is correct and try again.
  At C:\Users\aymen.daoudi\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1:26 char:1
  + Enable-GitColors
  + ~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Enable-GitColors:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  
  Pop-Location : The term 'Pop-Location' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
  path was included, verify that the path is correct and try again.
  At C:\Users\aymen.daoudi\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1:28 char:1
  + Pop-Location
  + ~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Pop-Location:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  
  Start-SshAgent : The term 'Start-SshAgent' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
  a path was included, verify that the path is correct and try again.
  At C:\Users\aymen.daoudi\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1:30 char:1
  + Start-SshAgent -Quiet
  + ~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Start-SshAgent:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  </code></pre>
  
  <p>Here's a picture of that : </p>
  
  <p><img src="https://i.stack.imgur.com/XoRZ6.png" alt="enter image description here"></p>
  
  <p>I tried to restart the PC, but still have the same problem every time I start a new PowerShell session, I noticed that many commands don't work, what caused this problem ? and what should I do to solve it ?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I removed the profiles added by PoshGit, when starting a new session, I don't have any error, but powershell still doesn't recognize commands, for example calling Clear-host, throws lots of errors that I can't understand the cause !</p>
  
  <p><img src="https://i.stack.imgur.com/SWRp9.png" alt="enter image description here"></p>