Introduction: Yesterday while troubleshooting a network issue, I realized that if I can know the vendor of a MAC Address, then I could understand if it’s a Dell Router, a VMWare virtual NIC or a Dell server then maybe it will make life a bit easy, like in the following example. The Idea and Making it work:… Read More Get-MACVendor using Powershell
In order to write less code or to write better one-liners in Powershell, I often find one of these techniques useful, and let me know if you feel the same. Using -OutVariable parameter Variable squeezing Its a shame many of us ( including myself 😉 ) were not aware of this for quite long. Using Tee-Object Cmdlet… Read More 3 ways to Store & Display results in/from a Powershell variable at the same time
If you are reading this you must have used Select-object in PowerShell to select properties of an object something like Or, Where-Object cmdlet to filter out values on any specific object property like All these work well when you know the Property Name you are searching. But what if you don’t know the property name and… Read More Selecting Objects by value in Powershell
Introduction A few days ago in a discussion on Facebook’s PowerShell Group, I realized the many people don’t understand how to Tokenize or Use Abstract Syntax Tree to understand your PowerShell scripts better. I think the reason behind this unawareness is mostly because it doesn’t affect your ability to write better scripts, but you’ve to agree it… Read More PowerShell: Tokenization and Abstract Syntax Tree
Changing a URL candidate to valid ASCII format is called URL Encoding and can be done like in the below image using System.Web.HttpUtility class in .Net framework. You can also perform its reverse which is call URL Decoding.… Read More Encode\Decode URL with Powershell
Have you ever googled a port number to figure out what service uses it? I think every system administrator must have done this. But what if there are a lot of port to search?
So I thought giving it try with PowerShell if we can use the shell to pro-grammatical get port information of lots of port numbers.… Read More Query Port Information using Powershell