[] to get objects representing the commands in the history and export them to the History.xml file
PS> get-history
| export-clixml 'history.xml'
[] to show content of History.xml file using default web browser (if above done)
PS> .\history.xml
[] to import commands in the History.xml file and show them on the screen
PS> import-clixml 'history.xml'
[] to import commands in the History.xml file and add them to the current session history
PS> import-clixml 'history.xml'
| add-history -passthru
` -passthru ` parameter shows the current session history on the screen, and won't store them into the History.xml file. The 'Id' is changing.
[] to import data from a Log file and store them into Xmlfile1.xml
PS> get-content .\Dec16-1205hr.PS2CTP2.log
| export-clixml xmlfile1.xml
or,
PS> get-content .\Dec16-1205hr.PS2CTP2.log
| ConvertTo-html
| Out-File htmfile1.htm
This is useful to know what is going on in "Action start..." and "Action ended..." in its .Log (20KB) file, by looking at Section tag in its .XML (510KB) file; .Htm (83KB) file shows garbage indeed.
Monday, January 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment