![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | More.com?? Quirk I've found a real oddity in PowerShell 1.0 RTW on two machines (one XP, one Windows 2003) Run this command: get-childitem function:he* | format-list Pay attention to the value of Definition. Notice that there are several references to "more.com" where I think it ought to be simply "more". At least that's what I see on my machines. Can others confirm this? One for Connect, I suspect, if it's confirmed. Why did I turn this up? On one machine running the command help about_reserved_words produced an error as below. PS script:\> help about_reserved_words The term 'more.com' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. At line:94 char:64 + get-help $Name -Category $Category | more.com <<<< PS script:\> Oddly, on the other machine the command produces the desired output. Andrew Watt MVP |
My System Specs![]() |
| | #2 (permalink) |
| | RE: More.com?? Quirk Comments in-line "Andrew Watt [MVP]" wrote: > Notice that there are several references to "more.com" where I think > it ought to be simply "more". At least that's what I see on my > machines. > > Can others confirm this? I have tested on two machines running Windows XP w/ SP2 and Windows 2003 w/ SP1. But i have not been able to confirm for that oddity. On both systems, running the previous commands resulted in the following output [^_^]PS[10]> get-childitem function:he* | format-list Name : help CommandType : Function Definition : get-help $args[0] | out-host -paging > Why did I turn this up? On one machine running the command I have a feeling that your profile might dot source a custom "help" function <... 5 minutes later...> Oh, i have just started a powershell instance with "-noprofile" flag(powershell -nologo -noprofile) and when i ran (get-childitem function:he* | format-list) command again, the definition is a lot longer than what I pasted above... Now I can see a lot of places where "more.com" is used. [^_^]PS[12]>powershell -nologo -noprofile PS C:\programming\ps\provider\EventLogProvider> get-childitem function:he* | format-list Name : help CommandType : Function Definition : param([string]$Name,[string[]]$Category=@('All'),[string[]]$Component, [string[]]$Functionality,[string[]]$Role,[switch]$Full, [switch]$Detailed,[switch]$Examples,[string]$Parameter=$null) &{ #Set the outputencoding to Console::OutputEncoding. More.com doesn't work well with Unicode. $outputEncoding=[System.Console]::OutputEncoding # Full,Examples,Detailed,Parameter are in different parameter sets if ($Full) { if ($Detailed) { #Detailed and #Full are in different sets..let get-help cmdlet handle the error get-help $Name -Full -Detailed | more.com return; } if ($Examples) { #Examples and #Full are in different sets..let get-help cmdlet handle the error get-help $Name -Full -Examples | more.com return; } if ($Parameter) { #Parameter and #Full are in different sets..let get-help cmdlet handle the error get-help $Name -Full -Parameter $Parameter | more.com return; } if ( ($Component) -or ($Functionality) -or ($Role) ) { get-help $Name -Full -Category $Category -Component $Component -Functionality $Functionality -Role $Role | more.com return; } get-help -Full $Name -Category $Category | more.com } elseif ($Detailed) { if ($Examples) { #Examples and #Detailed are in different sets..let get-help cmdlet handle the error get-help $Name -Detailed -Examples | more.com return; } if ($Parameter) { #Parameter and #Detailed are in different sets..let get-help cmdlet handle the error get-help $Name -Detailed -Parameter $Parameter | more.com return; } if ( ($Component) -or ($Functionality) -or ($Role) ) { get-help $Name -Detailed -Category $Category -Component $Component -Functionality $Functionality -Role $Role | more.com return; } get-help $Name -Detailed -Category $Category | more.com } elseif ($Examples) { if ($Parameter) { #Parameter and #Examples are in different sets..let get-help cmdlet handle the error get-help $Name -Examples -Parameter $Parameter | more.com return; } if ( ($Component) -or ($Functionality) -or ($Role) ) { get-help $Name -Examples -Category $Category -Component $Component -Functionality $Functionality -Role $Role | more.com return; } get-help $Name -Examples -Category $Category | more.com } elseif ($Parameter) { if ( ($Component) -or ($Functionality) -or ($Role) ) { get-help $Name -Parameter $Parameter -Category $Category -Component $Component -Functionality $Functionality -Role $Role | more.com return; } get-help $Name -Parameter $Parameter -Category $Category | more.com } elseif ( ($Component) -or ($Functionality) -or ($Role) ) { get-help $Name -Category $Category -Component $Component -Functionality $Functionality -Role $Role | more.com return; } else { get-help $Name -Category $Category | more.com } } > help about_reserved_words > > produced an error as below. > > PS script:\> help about_reserved_words > The term 'more.com' is not recognized as a cmdlet, function, operable > program, or script file. Verify the term and try > again. > At line:94 char:64 > + get-help $Name -Category $Category | more.com <<<< > PS script:\> Even with "-noprofile" i wasn't able to get above errors, but instead of getting powershell "more" prompt "<SPACE> next page; <CR> next line; Q quit", powershell prompted with "-- More --", which more.com should be responsible |
My System Specs![]() |
| | #3 (permalink) |
| | Re: More.com?? Quirk lol, never noticed as I had ... set-alias more more.com .... in my profile allready ;-) gr /\/\o\/\/ "Sung M Kim" <SungMKim@discussions.microsoft.com> wrote in message news:57D3B764-1398-470B-B9DD-500E12A0B35A@microsoft.com... > Comments in-line > > "Andrew Watt [MVP]" wrote: >> Notice that there are several references to "more.com" where I think >> it ought to be simply "more". At least that's what I see on my >> machines. >> >> Can others confirm this? > > I have tested on two machines running Windows XP w/ SP2 and Windows 2003 > w/ > SP1. But i have not been able to confirm for that oddity. > > On both systems, running the previous commands resulted in the following > output > > [^_^]PS[10]> get-childitem function:he* | format-list > Name : help > CommandType : Function > Definition : get-help $args[0] | out-host -paging > > >> Why did I turn this up? On one machine running the command > > I have a feeling that your profile might dot source a custom "help" > function > <... 5 minutes later...> > > Oh, i have just started a powershell instance with "-noprofile" > flag(powershell -nologo -noprofile) and when i ran (get-childitem > function:he* | format-list) command again, the definition is a lot longer > than what I pasted above... > > Now I can see a lot of places where "more.com" is used. > > > > [^_^]PS[12]>powershell -nologo -noprofile > PS C:\programming\ps\provider\EventLogProvider> get-childitem function:he* > | > format-list > > > Name : help > CommandType : Function > Definition : > param([string]$Name,[string[]]$Category=@('All'),[string[]]$Component, > > [string[]]$Functionality,[string[]]$Role,[switch]$Full, > > [switch]$Detailed,[switch]$Examples,[string]$Parameter=$null) > &{ > #Set the outputencoding to > Console::OutputEncoding. More.com doesn't work well with Unicode. > > $outputEncoding=[System.Console]::OutputEncoding > # Full,Examples,Detailed,Parameter are in > different parameter sets > if ($Full) > { > if ($Detailed) > { > #Detailed and #Full are in different > sets..let get-help cmdlet handle the error > get-help $Name -Full -Detailed | > more.com > return; > } > > if ($Examples) > { > #Examples and #Full are in different > sets..let get-help cmdlet handle the error > get-help $Name -Full -Examples | > more.com > return; > } > > if ($Parameter) > { > #Parameter and #Full are in different > sets..let get-help cmdlet handle the error > get-help $Name -Full -Parameter > $Parameter > | more.com > return; > } > > if ( ($Component) -or ($Functionality) -or > ($Role) ) > { > get-help $Name -Full -Category $Category > -Component $Component -Functionality $Functionality -Role $Role | more.com > return; > } > > get-help -Full $Name -Category $Category | > more.com > } > elseif ($Detailed) > { > if ($Examples) > { > #Examples and #Detailed are in different > sets..let get-help cmdlet handle the error > get-help $Name -Detailed -Examples | > more.com > return; > } > > if ($Parameter) > { > #Parameter and #Detailed are in different > sets..let get-help cmdlet handle the error > get-help $Name -Detailed -Parameter > $Parameter | more.com > return; > } > > if ( ($Component) -or ($Functionality) -or > ($Role) ) > { > get-help $Name -Detailed -Category > $Category -Component $Component -Functionality $Functionality -Role $Role > | > more.com > return; > } > get-help $Name -Detailed -Category > $Category > | more.com > } > elseif ($Examples) > { > if ($Parameter) > { > #Parameter and #Examples are in different > sets..let get-help cmdlet handle the error > get-help $Name -Examples -Parameter > $Parameter | more.com > return; > } > > if ( ($Component) -or ($Functionality) -or > ($Role) ) > { > get-help $Name -Examples -Category > $Category -Component $Component -Functionality $Functionality -Role $Role > | > more.com > return; > } > get-help $Name -Examples -Category $Category > | more.com > } > elseif ($Parameter) > { > if ( ($Component) -or ($Functionality) -or > ($Role) ) > { > get-help $Name -Parameter $Parameter > -Category $Category -Component $Component -Functionality > $Functionality -Role > $Role | more.com > return; > } > get-help $Name -Parameter $Parameter > -Category $Category | more.com > } > elseif ( ($Component) -or ($Functionality) -or > ($Role) ) > { > get-help $Name -Category > $Category -Component > $Component -Functionality $Functionality -Role $Role | more.com > return; > } > else > { > get-help $Name -Category $Category | > more.com > } > } > > > > >> help about_reserved_words >> >> produced an error as below. >> >> PS script:\> help about_reserved_words >> The term 'more.com' is not recognized as a cmdlet, function, operable >> program, or script file. Verify the term and try >> again. >> At line:94 char:64 >> + get-help $Name -Category $Category | more.com <<<< >> PS script:\> > > Even with "-noprofile" i wasn't able to get above errors, > but instead of getting powershell "more" prompt "<SPACE> next page; <CR> > next line; Q quit", > powershell prompted with "-- More --", which more.com should be > responsible > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: More.com?? Quirk Hi Andrew, > Notice that there are several references to "more.com" where I think > it ought to be simply "more". At least that's what I see on my > machines. > > Can others confirm this? Yes. There are at least 17 references to more.com: 0:29 > (get-childitem function:he* | % {$_.Definition.Split("`r`n")} | ?{$_ -match "more.com";} | measure-object).Count 17 To confirm your error message, you only have to rename more.com and watch for the output of "help about_reserved_words": 0:30 > ren "$env:windir\System32\more.com" more.com.bak 0:31 > help about_reserved_words Die Benennung "more.com" wurde nicht als Cmdlet, Funktion, ausführbares Programm oder Skriptdatei erkannt. Überprüfen S ie die Benennung, und versuchen Sie es erneut. Bei Zeile:94 Zeichen:64 + get-help $Name -Category $Category | more.com <<<< That's the error message you already posted - in German as you might have guessed ;-) btw: don't forget to rename more.com thereafter ;-) 0:32 > ren "$env:windir\System32\more.com.bak" more.com hth Max |
My System Specs![]() |
| | #5 (permalink) |
| | Re: More.com?? Quirk btw: Tested on the following machines: - Win XP Pro SP2 with PoSh 1.0 RTM - W2k3 Standard SP1 with PoSh 1.0 RTM both a German versions hth Max |
My System Specs![]() |
| | #6 (permalink) |
| | RE: More.com?? Quirk I didn't see it either. This is what I got PS> Get-ChildItem function:he* | Format-List Name : help CommandType : Function Definition : clear-host get-help $args[0] -full -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty "Andrew Watt [MVP]" wrote: > I've found a real oddity in PowerShell 1.0 RTW on two machines (one > XP, one Windows 2003) > > Run this command: > > get-childitem function:he* | format-list > > Pay attention to the value of Definition. > > Notice that there are several references to "more.com" where I think > it ought to be simply "more". At least that's what I see on my > machines. > > Can others confirm this? > > One for Connect, I suspect, if it's confirmed. > > Why did I turn this up? On one machine running the command > > help about_reserved_words > > produced an error as below. > > PS script:\> help about_reserved_words > The term 'more.com' is not recognized as a cmdlet, function, operable > program, or script file. Verify the term and try > again. > At line:94 char:64 > + get-help $Name -Category $Category | more.com <<<< > PS script:\> > > Oddly, on the other machine the command produces the desired output. > > Andrew Watt MVP > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: More.com?? Quirk In message <9eo6r256msnc3cvm527hm6202kiv9dkq1l@4ax.com>, "Andrew Watt [MVP]" <SVGDeveloper@aol.com> writes >Notice that there are several references to "more.com" where I think it >ought to be simply "more". At least that's what I see on my machines. > >Can others confirm this? I am seeing what you are seeing (references to more.com). Could this be something to do with the PSCX community extensions (a wild guess, but it's the only think I can think of). -- Thomas Lee doctordns@gmail.com MVP - Admin Frameworks and Security |
My System Specs![]() |
| | #8 (permalink) |
| | Re: More.com?? Quirk On Sun, 21 Jan 2007 22:33:38 +0000, Thomas Lee <tfl@psp.co.uk> wrote: >In message <9eo6r256msnc3cvm527hm6202kiv9dkq1l@4ax.com>, "Andrew Watt >[MVP]" <SVGDeveloper@aol.com> writes >>Notice that there are several references to "more.com" where I think it >>ought to be simply "more". At least that's what I see on my machines. >> >>Can others confirm this? > >I am seeing what you are seeing (references to more.com). > >Could this be something to do with the PSCX community extensions (a wild >guess, but it's the only think I can think of). Hi Thomas, I haven't had PSCX on any of my machines. So, at least at this end, that can't be the explanation. Andrew Watt MVP |
My System Specs![]() |
| | #9 (permalink) |
| | Re: More.com?? Quirk Hi Andrew, Help function uses more.com as the experience using more.com is a little better than the default more (out-host -p) For example: ***************************** PS C:\temp> help -full add-content > temp.txt PS C:\temp> gc temp.txt NAME Add-Content SYNOPSIS ***************************** PS C:\temp> (get-help -full add-content | more ) > temp.txt will not redirect output. We want to improve out-host in our feature releases. -- Thanks Krishna[MSFT] Windows PowerShell Team Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message news:9eo6r256msnc3cvm527hm6202kiv9dkq1l@4ax.com... > I've found a real oddity in PowerShell 1.0 RTW on two machines (one > XP, one Windows 2003) > > Run this command: > > get-childitem function:he* | format-list > > Pay attention to the value of Definition. > > Notice that there are several references to "more.com" where I think > it ought to be simply "more". At least that's what I see on my > machines. > > Can others confirm this? > > One for Connect, I suspect, if it's confirmed. > > Why did I turn this up? On one machine running the command > > help about_reserved_words > > produced an error as below. > > PS script:\> help about_reserved_words > The term 'more.com' is not recognized as a cmdlet, function, operable > program, or script file. Verify the term and try > again. > At line:94 char:64 > + get-help $Name -Category $Category | more.com <<<< > PS script:\> > > Oddly, on the other machine the command produces the desired output. > > Andrew Watt MVP |
My System Specs![]() |
| | #10 (permalink) |
| | Re: More.com?? Quirk Thanks, Krishna, for the background information. As you say it's a "feature" that needs to be improved in a future release of PowerShell. Andrew Watt MVP On Mon, 22 Jan 2007 23:11:25 -0800, "Krishna Vutukuri[MSFT]" <kriscv@online.microsoft.com> wrote: >Hi Andrew, > >Help function uses more.com as the experience using more.com is a little >better than the default more (out-host -p) > >For example: > >***************************** >PS C:\temp> help -full add-content > temp.txt >PS C:\temp> gc temp.txt > >NAME > Add-Content > >SYNOPSIS >***************************** > >PS C:\temp> (get-help -full add-content | more ) > temp.txt > >will not redirect output. > >We want to improve out-host in our feature releases. > >-- >Thanks >Krishna[MSFT] >Windows PowerShell Team >Microsoft Corporation >This posting is provided "AS IS" with no warranties, and confers no rights. > > >"Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message >news:9eo6r256msnc3cvm527hm6202kiv9dkq1l@4ax.com... >> I've found a real oddity in PowerShell 1.0 RTW on two machines (one >> XP, one Windows 2003) >> >> Run this command: >> >> get-childitem function:he* | format-list >> >> Pay attention to the value of Definition. >> >> Notice that there are several references to "more.com" where I think >> it ought to be simply "more". At least that's what I see on my >> machines. >> >> Can others confirm this? >> >> One for Connect, I suspect, if it's confirmed. >> >> Why did I turn this up? On one machine running the command >> >> help about_reserved_words >> >> produced an error as below. >> >> PS script:\> help about_reserved_words >> The term 'more.com' is not recognized as a cmdlet, function, operable >> program, or script file. Verify the term and try >> again. >> At line:94 char:64 >> + get-help $Name -Category $Category | more.com <<<< >> PS script:\> >> >> Oddly, on the other machine the command produces the desired output. >> >> Andrew Watt MVP |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Attachments quirk | Vista mail | |||
| An interesting PS3/MM6 quirk | Vista music pictures video | |||
| Printer Quirk | Vista hardware & devices | |||
| Annoying quirk... can you help? | Vista performance & maintenance | |||
| Cert quirk or bug? | PowerShell | |||