Skip to main content
View powershell history and invoke

Hi All!

When you do administration activities, you may need to work around with multiple commands in powershell. It is bit difficul to remember all the commands we tried because some of them may be fetched from internet.

Consider you tried more than 100 commands in current powershell session and may require to try the same large command. One of the way is you can press up arrow many times to see the previously tried command.

we have another easy way is to see the history and invoke it by using its order number instead of whole command typing.

Please look into the below example

Comments

Popular posts from this blog

While loop with head and tail in linux Hi All! In today's post we're going to see/refresh about while loop with head and tail in bash. head - Read the first top 'n' lines. Example: head -n 5 reads first 5 lines from a file or input. tail - Read the last 'n' lines. Example: tail -n 5 reads last 5 lines from a file or input. Please look into the below image we have a txt file called file1.txt which has 3 lines of text and we read using head and tail as above.
Avoid YAML Validation error in azure devops pipeline Hi All! Consider a scenario that you committed a YML CI/CD file on the repository with some syntax, indentation and/or other error(s). so that pipeline failed. After you find some errors and rectified in the repository file and committed again but pipeline still gets failed because some errors are still there. Now you afraid that even if you fixed error in all the places, what happens if pipeline failed again because your project lead or manager set up build notification mail trigger for build success and fails. you need to answer them for build fail reason. Azure devops pipelines offers YAML validation feature after altered and before committed and before run pipeline. To utilize this feature, what we do is, Instead of modifying the file from repository, Do as below Go to the specific build click "Edit Pipeline" Modify/fix errors and click "validate" as shown in the picture below ...