How to change remote session prompt?

Copper Contributor

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?

 

3 Replies

@ahinterl 

 

Hi, Andreas.

 

Have you tried the first option for "All users, All hosts"? There's a number of different locations for profile customisations for both PowerShell and Windows PowerShell.

 

 

If a particular file doesn't yet exist, create it.

 

Cheers,

Lain

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).

@ahinterl 

 

Okay, my fault.

 

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

 

LainRobertson_0-1710768048275.png

 

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

 

Cheers,

Lain