PowerShell MVP Oisin Grehan posted a very promising PowerShell module the other day. He calls it the PModem File Transfer Protocol. It is based on the old bulletin board file transfer protocols of the late 20th century, which I have to admit I fondly remember using. Of course Oisin’s work intrigued me and after playing…
Category: PowerShell v2.0
Get-NumberedContent v2
I wasn’t completely satisfied with the updated version of my Get-NumberedContent function. You should still refer to the earlier post for details on how to use the function. But I had some issues with the previous version and realized there were a few bugs. I’ve since updated the Get-NumberedContent function.
More Fun with Get-NumberedContent
As much fun as the original Get-NumberedContent function was after using it for awhile I realized I had imposed some limitations. I also realized it needed to be more flexible. What if someone wanted to specify a different color or use a different comment character such as a ; in an ini file? I also…
Out-Notepad Redux
I got some great comments and suggestion on my original version of Out-Notepad, which should work just find on PowerShell v1.0 or 2.0. However, because v2.0 has such terrific features I decided to rework my function into a PowerShell v2.0 only version that also incorporates a few new features.
Out-Notepad
Maybe this isn’t the most earth shattering PowerShell function you’ll ever come across, but it saves me a few keystrokes. There are times when I want to see the results of PowerShell expression but the console output is insufficient. I want to see the results in a text file opened in Notepad so I can easily scroll, search or whatever.
Is That Folder Empty?
In keeping with my recent trend of offering solutions based on PowerShell v2.0, here’s a function I’ve revised to test if a folder is empty. I can’t recall where I used the original function or if I ever did. But I came across it recently and decided to give it a facelift. Manually determining if…
5 Minute PowerShell
My October Mr. Roboto column is now available online. The article contains my suggestions for how someone completely new to PowerShell might spend their first 5 minutes. Perhaps not literally, since I expect most people will want to spend more than 60 seconds on my suggested steps. But overall I thought my proposal was a…
Out-MSWord Revised
This summer I wrote about a function I developed called Out-MSWord. The function was discussed in my Practical PowerShell column which was published in the free e-Journal Windows Administration in RealTime put out by RealTime Publishers. The original was published in Issue #17 if you are interested. The function accepted pipelined input and created a Microsoft Word document. Naturally, you need to have Microsoft Word installed in order for this to work.
PS C:\> get-service | out-MSWord
The function accepted a number of parameters so you could control font name, size, color, append, and more. The function was written for PowerShell v1.0 but also worked on PowerShell v2.0. However, I was revisiting the function and realize there were places I could tweak, such as adding additional error handing. I also realized that if rewrote this for PowerShell v2.0, I could create an advanced function and take advantage of cmdletbinding, advanced parameters and help.
Powershell: Exit Stage Left
While reviewing and revising the manuscript for Windows PowerShell v2.0: TFM 3rd ed. I had the opportunity to revisit our chapter on working with events in PowerShell. An event in Windows is when something happens like a mouse-click, a process being created or window resized. In PowerShell you can easily watch for an event of interest and then do something when it happens or fires. This is referred to as an event subscription.
PowerShell v2.0 has a few event related cmdlets you can use for creating an event subscription: Register-WMIEvent, Register-ObjectEvent and Register-EngineEvent. Today I want to show you something I think you might find helpful using the last cmdlet in the list.
Revising Windows PowerShell: TFM 3rd
I know there was some concern related to my departure from SAPIEN about the status of the Windows PowerShell: TFM book. You’ll be happy to know that Don Jones and I are both involved now in the final revisions. SAPIEN is very committed to this project and supporting the PowerShell community and I’m very happy…
Summary Judgment
While working on a new article for REDMOND magazine about PowerShell 2.0, I wanted to get some cmdlet information. I wanted an easy way to see a list of cmdlets for a given verb or noun. Of course that is easily done with Get-Command. However this only gives my the definition.
After a little experimenting I found that I could get the help synopsis with the actual Get-Help cmdlet, not the Help function. So combining the two gives me the results I need.