PowerShell Tip: Specify Select Column List (Attributes/Properties) Dynamically

As we pipe stuff through a pipeline, we may have the need to add/remove/rename columns. These three operations are easy to do. Remove/Add/Rename Remove: Here we remove all attributes returned from Get-Process except Handles and ProcessName by not selecting them Add: Here we add a new attribute name "NewAttribute" to the existing two attributes Handles … Continue reading PowerShell Tip: Specify Select Column List (Attributes/Properties) Dynamically

Oracle – Interval Datatype – Extracting Components (Years/Months/Days/Hours/Minutues/Seconds)- Usage Example Reference

If you have not checked my quick intro to the Interval datatype here, please do so before reading on. Now, that we know the “interval” data type, let us see how we can extract out the individual components within it for both the “DAY TO SECOND” and “YEAR TO MONTH” variations. The following example should … Continue reading Oracle – Interval Datatype – Extracting Components (Years/Months/Days/Hours/Minutues/Seconds)- Usage Example Reference

PowerShell – Update-Object – Function to add/update object properties

It is not that no one could write this function. In fact, anyone could, but no one would! If someone did, everyone would use it - a function to add/update properties of an object. More precisely, a function that Adds new properties Do appropriate checks to see property existence Ignore or alert if properties are missing Default … Continue reading PowerShell – Update-Object – Function to add/update object properties