Windows Vista Forums

BUG? Read-Host 'xxx' can't read '!xxx'
  1. #1


    =?Utf-8?B?Um9tYW4gS3V6bWlu?= Guest

    BUG? Read-Host 'xxx' can't read '!xxx'

    BUG? Read-Host 'xxx' can't read '!xxx'



    Try this:

    PS> Read-Host 'xxx'

    and type !xxx there, i.e.

    xxx: !xxx

    I get this:

    "!xxx" cannot be recognized as a valid Prompt command.
    xxx:

    and Read-Host still waits for my input.

    *) Is it a bug?
    *) If it is not a bug, what is that?
    *) If it is not a bug, how do I enter a string starting with '!' using
    Read-Host?

    Note: if I do not use a prompt string at all, everything is 'fine', i.e.

    PS> Read-Host
    !xxx
    !xxx

    --
    Thanks,
    Roman

      My System SpecsSystem Spec

  2. #2


    =?Utf-8?B?L1wvXG9cL1wv?= Guest

    RE: BUG? Read-Host 'xxx' can't read '!xxx'

    Don't ask me why :

    MowPS>read-host 'xxx'
    xxx: !!xxx
    !xxx

    gr /\/\o\/\/


    "Roman Kuzmin" wrote:

    > BUG? Read-Host 'xxx' can't read '!xxx'
    >
    > Try this:
    >
    > PS> Read-Host 'xxx'
    >
    > and type !xxx there, i.e.
    >
    > xxx: !xxx
    >
    > I get this:
    >
    > "!xxx" cannot be recognized as a valid Prompt command.
    > xxx:
    >
    > and Read-Host still waits for my input.
    >
    > *) Is it a bug?
    > *) If it is not a bug, what is that?
    > *) If it is not a bug, how do I enter a string starting with '!' using
    > Read-Host?
    >
    > Note: if I do not use a prompt string at all, everything is 'fine', i.e.
    >
    > PS> Read-Host
    > !xxx
    > !xxx
    >
    > --
    > Thanks,
    > Roman


      My System SpecsSystem Spec

  3. #3


    =?Utf-8?B?Um9tYW4gS3V6bWlu?= Guest

    RE: BUG? Read-Host 'xxx' can't read '!xxx'

    "/\/\o\/\/" wrote:
    > Don't ask me why :
    > MowPS>read-host 'xxx'
    > xxx: !!xxx
    > !xxx


    Well, at least we know how to live with that now.

    --
    Thanks,
    Roman


      My System SpecsSystem Spec

  4. #4


    =?Utf-8?B?ZHJlZXNjaGtpbmQ=?= Guest

    RE: BUG? Read-Host 'xxx' can't read '!xxx'

    "Roman Kuzmin" wrote:

    > BUG? Read-Host 'xxx' can't read '!xxx'
    >
    > Try this:
    >
    > PS> Read-Host 'xxx'
    >
    > and type !xxx there, i.e.
    >
    > xxx: !xxx
    >
    > I get this:
    >
    > "!xxx" cannot be recognized as a valid Prompt command.
    > xxx:
    >
    > and Read-Host still waits for my input.
    >
    > *) Is it a bug?


    I'd vote this one.

    > *) If it is not a bug, what is that?
    > *) If it is not a bug, how do I enter a string starting with '!' using
    > Read-Host?
    >
    > Note: if I do not use a prompt string at all, everything is 'fine', i.e.
    >
    > PS> Read-Host
    > !xxx
    > !xxx
    >
    > --
    > Thanks,
    > Roman


    --
    greetings
    dreeschkind

      My System SpecsSystem Spec

  5. #5


    Jeffrey Snover [MSFT] Guest

    Re: BUG? Read-Host 'xxx' can't read '!xxx'

    Very strange. Please bug this.

    --
    Jeffrey Snover [MSFT]
    Windows PowerShell/Aspen Architect
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, no confers rights.
    Visit the Windows PowerShell Team blog at:
    http://blogs.msdn.com/PowerShell
    Visit the Windows PowerShell ScriptCenter at:
    http://www.microsoft.com/technet/scr.../hubs/msh.mspx



      My System SpecsSystem Spec

  6. #6


    =?Utf-8?B?Um9tYW4gS3V6bWlu?= Guest

    Re: BUG? Read-Host 'xxx' can't read '!xxx'

    "Jeffrey Snover [MSFT]" wrote:
    > Very strange. Please bug this.


    I constantly can't connect to Connect. Can anybody file this issue?

    --
    Thanks,
    Roman


      My System SpecsSystem Spec

  7. #7


    =?Utf-8?B?ZHJlZXNjaGtpbmQ=?= Guest

    Re: BUG? Read-Host 'xxx' can't read '!xxx'

    Feedback-ID 195045 filed at connect.

    https://connect.microsoft.com/feedba...5045&SiteID=99

    --
    greetings
    dreeschkind

    "Roman Kuzmin" wrote:

    > "Jeffrey Snover [MSFT]" wrote:
    > > Very strange. Please bug this.

    >
    > I constantly can't connect to Connect. Can anybody file this issue?
    >
    > --
    > Thanks,
    > Roman
    >


      My System SpecsSystem Spec

  8. #8


    Lee Holmes [MSFT] Guest

    Re: BUG? Read-Host 'xxx' can't read '!xxx'

    Any input that starts with an exclamation mark in response to a prompt is
    called a 'Prompt command.' It is an infrastructure to allow you to
    interesting things like get help on a certain item, etc. I don't have an
    example off-hand to show it in action, though.

    --
    Lee Holmes [MSFT]
    Windows PowerShell Development
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.


    "dreeschkind" <dreeschkind@discussions.microsoft.com> wrote in message
    news:BDF64891-DA29-44C0-A125-6627987C01AD@microsoft.com...
    > Feedback-ID 195045 filed at connect.
    >
    > https://connect.microsoft.com/feedba...5045&SiteID=99
    >
    > --
    > greetings
    > dreeschkind
    >
    > "Roman Kuzmin" wrote:
    >
    >> "Jeffrey Snover [MSFT]" wrote:
    >> > Very strange. Please bug this.

    >>
    >> I constantly can't connect to Connect. Can anybody file this issue?
    >>
    >> --
    >> Thanks,
    >> Roman
    >>




      My System SpecsSystem Spec

  9. #9


    =?Utf-8?B?ZHJlZXNjaGtpbmQ=?= Guest

    Re: BUG? Read-Host 'xxx' can't read '!xxx'

    "Lee Holmes [MSFT]" wrote:

    > Any input that starts with an exclamation mark in response to a prompt is
    > called a 'Prompt command.' It is an infrastructure to allow you to
    > interesting things like get help on a certain item, etc. I don't have an
    > example off-hand to show it in action, though.


    This sounds like an interesting feature.
    I'd love to read more about targeted use cases or see some examples soon.
    Keep up the good work!

    --
    greetings
    dreeschkind

    > --
    > Lee Holmes [MSFT]
    > Windows PowerShell Development
    > Microsoft Corporation
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    > "dreeschkind" <dreeschkind@discussions.microsoft.com> wrote in message
    > news:BDF64891-DA29-44C0-A125-6627987C01AD@microsoft.com...
    > > Feedback-ID 195045 filed at connect.
    > >
    > > https://connect.microsoft.com/feedba...5045&SiteID=99
    > >
    > > --
    > > greetings
    > > dreeschkind
    > >
    > > "Roman Kuzmin" wrote:
    > >
    > >> "Jeffrey Snover [MSFT]" wrote:
    > >> > Very strange. Please bug this.
    > >>
    > >> I constantly can't connect to Connect. Can anybody file this issue?
    > >>
    > >> --
    > >> Thanks,
    > >> Roman
    > >>

    >
    >
    >


      My System SpecsSystem Spec

  10. #10


    =?Utf-8?B?Um9tYW4gS3V6bWlu?= Guest

    Re: BUG? Read-Host 'xxx' can't read '!xxx'

    "Lee Holmes [MSFT]" wrote:
    > Any input that starts with an exclamation mark in response to a prompt is
    > called a 'Prompt command.' It is an infrastructure to allow you to
    > interesting things like get help on a certain item, etc. I don't have an
    > example off-hand to show it in action, though.


    I find this idea quite confusing. I thought that Read-Host is the only way
    now to input something into PowerShell without
    escaping/evaluating/wildcarding/etc. Well, it is not. But again, why to use
    '!', i.e. a symbol legal for file system paths? File system paths are the
    most popular candidates for a user input, aren't they?

    It is questionable that a user will find this useful. But I already predict
    my duty to teach any user what he/she has to avoid at input. And for many of
    them it will not work anyway. I predict unpleasant time consuming issues
    related to this 'good'.

    --
    Thanks,
    Roman


      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
BUG? Read-Host 'xxx' can't read '!xxx' problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Host File Not Read behind Server gr SBS Server 4 20 Oct 2009
Read-Host values into an Array Flea# PowerShell 5 05 Sep 2008
read-host -assecurestring problem GodOfLions PowerShell 1 05 Jun 2008
Read-Host issue, won't store to variable when using multiple read-host lines bryan.rutkowski@gmail.com PowerShell 7 09 Feb 2007
Default value for Read-Host =?Utf-8?B?Um9tYW4gS3V6bWlu?= PowerShell 0 07 Sep 2006