My PowerShell shell sometimes hangs after any command - such as
ls. Also, after I force close the window, when I open another shell window, it shows the following error:
Windows PowerShell Copyright (C) 2013 Microsoft Corporation. All rights reserved. Test-Path : The term 'Test-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\user\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:9 char:5 + if (Test-Path $PoshHistoryPath) + ~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Test-Path:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
With -NoProfile option, this does not happen so I suspect something in my profile causes this, but it is hard to pinpoint what is the problem since usually after a while PowerShell acts normally.