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 Alternatively, you could use the ExcludeProperty parameter if you have to select everything except a … Continue reading PowerShell Tip: Specify Select Column List (Attributes/Properties) Dynamically
Tag: Tip
Quick Tip: “Paste” shortcut key + why is copy/paste so hard in the PowerShell command line?
Technorati Tags: PowerShell If you wanted to paste text into the PowerShell command line console, you can right-click. That is great but command line people usually try to avoid the mouse and stay with keyboard shortcuts whenever they can. Having said that, to paste with keyboard short-cut, you need to do this ALT+SPACE ALT+SPACE+E (follow-up … Continue reading Quick Tip: “Paste” shortcut key + why is copy/paste so hard in the PowerShell command line?
Quick Tip: Find the time and reason for Windows server restart using Powershell
As a database administrator, often times, you need to find-out who rebooted a Windows Server running a SQL Server instance. Using the "Windows Event Manager" is a drag (IMHO). Use this Powershell command to do it quickly Get-Eventlog -logname system -message '*restart*' -Newest 10 | Format-Table -wrap It gets the eventlog of type "system" with … Continue reading Quick Tip: Find the time and reason for Windows server restart using Powershell