Powershell Tutorial
Introduction to Powershell Managing History of Powershell Commands Cmdlet, Alias, Function and Module in Powershell PSDrive Profile in Windows Powershell Variable Management in Powershell Passing values to parameters from file Creating files and directories Basic File System commands Finding the patterns in files Unique command Replacing patterns in files Comparing objects Sorting objects Other object commands Getting members of an Object Managing processes Managing Jobs IO redirection Piping System Commands Network commands Service Commands WMI(Windows Management Instrumentation) CIM (Common Information Model) Formatting output exporting output XML processing Powershell Module Management Remote computer managementManaging history of commands in windows powershell
When you type command in the Powershell, all those commands are saved in the history. You can use below commands to manage history of commands.- Get-History : This command shows the list of the commands entered during the current session.
- Invoke-History : This command executes specific command from the session history. For example “Invoke-History 4” will execute 4th command in the list.
- Add-History : This command appends entries to the session history.
- Clear-History : This command removes entries from the command history.
> Get-History | Export-Clixml “history.xml”
We can import all commands from the file using below syntax.
> Import-Clixml “history.xml” | Add-History
Web development and Automation testing
solutions delivered!!