Script to analyze your PowerShell history

2020-11-15 · 1 min · Marco Kamner

Netstat With Process Names

How to show process names in netstat on Windows

2020-11-09 · 1 min · Marco Kamner

Diff Objects

Diff different data types in PowerShell

2020-11-09 · 1 min · Marco Kamner

How To Grep With PowerShell

Filtering data, from log or config files to data returned by an api, is an important operation to remove noise from it and make further analysis possible. In Bash most would gravitate towards grep, egrep or awk. Classic examples would be looking at your history $ history | grep ssh ssh marco@ ssh deploy@ ssh admin@ looking for errors in a log $ cat /var/log/app.log | grep error 2020-09-30 09:01:17 error: twitter api responded with 403 2020-09-30 09:16:05 error: secret plan to take over the world failed grep $ grep api app....

2020-09-30 · 4 min · Marco Kamner

How To Tail With PowerShell

Printing the last or first, few lines of a file is a common operation in day to day operations. On Linux most people will, without thinking twice, use tail and it’s counterpart head to achieve this. It’s man page1 describes tail simply like this Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name....

2020-09-21 · 3 min · Marco Kamner

Bash Utilities In Powershell

Whats the first thing coming to mind when seeing a command line? For most people it is Linux, be it Ubuntu, Debian or RedHat. And it is completely understandable. A big part of our industry has a background in Linux and sees it as the superior system for quick scripts and the like. In this series I want to challenge this notion. PowerShell can compete with, an in some cases outperform, the quick scripts and common daily tasks done in Linux shells....

2020-09-20 · 1 min · Marco Kamner