locked
notepad $PSHOME access denied as administrator RRS feed

  • Question

  • I would like to edit the $PSHOME profile but I am denied access even as the administrator. I am the sole user of my consumer grade laptop and I am running PowerShell 6 with administrator permissions. I have already set execution policy to unrestricted to try and gain access but it did not work. Any and all help is appreciated.
    Saturday, November 30, 2019 5:43 PM

Answers

  • There is no "$PSHOME" profile. $PSHOME is the path to PowerShell.

    To edit your profile use notepad.

    notepad $profile

    To view all profiles available do the following.

     $profile|gm -MemberType NoteProperty

    To learn how to use profiles:

    help about_profile

    Before changing things in your system with any version of PowerShell please learn basic PS.


    \_(ツ)_/

    • Marked as answer by VoyagerBravo Monday, December 2, 2019 1:46 AM
    Saturday, November 30, 2019 6:42 PM

All replies

  • There is no "$PSHOME" profile. $PSHOME is the path to PowerShell.

    To edit your profile use notepad.

    notepad $profile

    To view all profiles available do the following.

     $profile|gm -MemberType NoteProperty

    To learn how to use profiles:

    help about_profile

    Before changing things in your system with any version of PowerShell please learn basic PS.


    \_(ツ)_/

    • Marked as answer by VoyagerBravo Monday, December 2, 2019 1:46 AM
    Saturday, November 30, 2019 6:42 PM
  • You might have to make the directory the $profile goes in first:

    mkdir (split-path $profile -parent)

    • Edited by JS2010 Sunday, December 1, 2019 5:06 PM
    Sunday, December 1, 2019 7:14 AM