"Jeff" <jeff.hillman@xxxxxx> wrote in message
news:789c5820-1a57-4049-9044-d8a7aaaaad4c@xxxxxx
> With CMD, by adding the System Variable for PROMPT: $m$p$g, can have the
> whole network address when using PUSHD.
>
> eg.
>
> C:\>pushd \\harthouse\C$
>
> \\harthouse\C$ X:\>
>
> With PowerShell, it seems that it already shows the full path in the
> prompt,
> but I am not sure if that is because it is using the System Variable that
> I
> made for CMD.
>
> e.g
>
> PS C:\> pushd \\harthouse\C$
> PS Microsoft.PowerShell.Core\FileSystem::\\harthouse\C$>
>
> I noticed that it does not seem to make a temporary mapped network drive,
> like using PUSHD in CMD does, and it does not appear in My Computer. This
> is fine, as I do not really use that anyway.
>
> But how do I shorten that silly prompt? I don't really want the PS there,
> which is there all the time, but what about the
> 'Microsoft.PowerShell.Core\FileSystem' bit? Is there any point of that?
>
> Cheers
>
> ss. The PowerShell prompt is highly customizable; all you need to do is
create a function call "prompt" in the global scope, and whatever that
function outputs becomes your prompt. Here is a simple example that
shows the current location, but doesn't include the
'Microsoft.PowerShell.Core\FileSystem' part for UNC paths:
function prompt
{
"$( (Get-Location).ProviderPath )>"
}
You can put all kinds of good stuff in there.
----------------------------------------------------------------------
Belated thanks!
ss.