Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

get-history -count defaults to 32

Closed Thread
 
Thread Tools Display Modes
Old 09-06-2007   #1 (permalink)
Marco Shaw
Guest


 

get-history -count defaults to 32

Is there a better way to look at *all* of the history when one doesn't
know how many entries there are?

This works:
--------
$hist=get-history -count 1|foreach-object{$_.id}
get-history -count $hist
--------

Should there be a -count value for *all*?

Maybe there's something more appropriate?

Marco

--
----------------
PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
Old 09-06-2007   #2 (permalink)
Kiron
Guest


 

Re: get-history -count defaults to 32

get-history -count $MaximumHistoryCount

--
Kiron

Old 09-06-2007   #3 (permalink)
ebgreen
Guest


 

RE: get-history -count defaults to 32

Get-History -count $MaximumHistoryCount

"Marco Shaw" wrote:
Quote:

> Is there a better way to look at *all* of the history when one doesn't
> know how many entries there are?
>
> This works:
> --------
> $hist=get-history -count 1|foreach-object{$_.id}
> get-history -count $hist
> --------
>
> Should there be a -count value for *all*?
>
> Maybe there's something more appropriate?
>
> Marco
>
> --
> ----------------
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
>
> Blog:
> http://marcoshaw.blogspot.com
>
Old 09-06-2007   #4 (permalink)
RichS
Guest


 

RE: get-history -count defaults to 32

There's some interesting tips on the history buffer in this article

http://mcpmag.com/columns/article.asp?editorialsid=2170

--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Marco Shaw" wrote:
Quote:

> Is there a better way to look at *all* of the history when one doesn't
> know how many entries there are?
>
> This works:
> --------
> $hist=get-history -count 1|foreach-object{$_.id}
> get-history -count $hist
> --------
>
> Should there be a -count value for *all*?
>
> Maybe there's something more appropriate?
>
> Marco
>
> --
> ----------------
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
>
> Blog:
> http://marcoshaw.blogspot.com
>
Old 09-06-2007   #5 (permalink)
Keith Hill [MVP]
Guest


 

Re: get-history -count defaults to 32

"Marco Shaw" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:#VWkHQL8HHA.1900@xxxxxx
Quote:

> Is there a better way to look at *all* of the history when one doesn't
> know how many entries there are?
>
> This works:
> --------
> $hist=get-history -count 1|foreach-object{$_.id}
> get-history -count $hist
> --------
>
> Should there be a -count value for *all*?
>
> Maybe there's something more appropriate?
>
I submitted this issue last year, you might want to vote on it:

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

--
Keith

Old 09-07-2007   #6 (permalink)
Marco Shaw
Guest


 

Re: get-history -count defaults to 32

Kiron wrote:
Quote:

> get-history -count $MaximumHistoryCount
>
OK... Strange:

PSH> get-history

Id CommandLine
-- -----------
[snip]
88 write-host
89 $maximumhistorycount
90 write-host "test"
91 $maximumhistorycount
92 get-history


PSH> $maximumhistorycount
64

That can't be right...

--
----------------
PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
Old 09-08-2007   #7 (permalink)
Kiron
Guest


 

Re: get-history -count defaults to 32

$MaximumHistoryCount sets the limit of HistoryInfo items the current session
keeps. The ID increments with each command.

For more:
Help About_History

--
Kiron

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save As defaults to internet history swb_mct Vista General 1 01-13-2008 08:01 PM
Paint defaults Novice Vista performance & maintenance 0 10-19-2007 09:59 AM
can you set anything but microsoft as defaults? John Vista General 5 08-22-2007 11:32 PM
VPN defaults domain David Lozzi Vista networking & sharing 2 02-06-2007 08:54 PM
Printer defaults to XPS retired fire Vista General 1 12-12-2006 06:28 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50