Forum Discussion

ahinterl's avatar
ahinterl
Copper Contributor
Mar 18, 2024

How to change remote session prompt?

For my 7.4.1 Powershell, I have a custom prompt stored in $PROFILE\profile.ps1 (that's the only profile file that exists on my machine). This works well until I start a remote session using Enter-PSSession, where I get a default prompt. How can I apply my custom prompt to remote sessions as well?

 

    • ahinterl's avatar
      ahinterl
      Copper Contributor
      Yes, I have. My profile is in the all users/all hosts location (see initial post) as per Microsoft's docs. I don't use Windows PowerShell as written (forgot to say that I run PowerShell on Windows 11).
      • LainRobertson's avatar
        LainRobertson
        Silver Contributor

        ahinterl 

         

        Okay, my fault.

         

        Perhaps I misread your original post, as I noted you had used $PROFILE, not $PSHOME.

         

         

        But if you have indeed tried both "all hosts" options, then I have nothing more to add at this stage.

         

        Cheers,

        Lain

Resources