locked
Getting Object reference not set to an instance of an object. NullReferenceException when I try to run get-command RRS feed

  • Question

  • Greetings, powershell newbie. i have been going through a pluralsight course on powershell and trying to run the commands in the course. I am hitting an error running get-command, it returns the error shown below. I am running on windows 7 sp1  running powershell v3 which I just installed from v2.  I have also hit an error when running update-help. notice that get-command -listimported does work.  I am running the ise as admin, it gets the same errors either way. I have tried it from command window using powershell.exe, it is consistent and errors. I checked if I had a profile and I do not, using test-path $profile  it returned false. I have ran the update-help -force -erroraction silentlycontinue and it appears to update skipping some. Appreciate any help here.



    • Edited by Abeljdang Friday, January 25, 2019 9:35 PM details
    Friday, January 25, 2019 9:34 PM

Answers

  • Assuming you have already restarted your system, please try installing latest version of powershell unless you want to practice on powershel v3 only :)

    $andeep

    • Marked as answer by Abeljdang Monday, January 28, 2019 3:04 PM
    Saturday, January 26, 2019 10:30 AM

All replies

  • It looks like you need to repair your system. 

    Contact MS support or search for articles on how to repair Win 7 systems.


    \_(ツ)_/

    Friday, January 25, 2019 10:16 PM
  • Assuming you have already restarted your system, please try installing latest version of powershell unless you want to practice on powershel v3 only :)

    $andeep

    • Marked as answer by Abeljdang Monday, January 28, 2019 3:04 PM
    Saturday, January 26, 2019 10:30 AM
  • was not sure what versions were compatible. I installed 5.1 and it is now working thanks
    Monday, January 28, 2019 3:04 PM