More fun with Microsoft Word and PowerShell

I needed a demonstration for one of my last online PowerShell classes on using COM objects in PowerShell. I took an old VBScript that used Microsoft Word to get document statistics such as word and page count and transformed it into PowerShell. I quickly realized I could flesh out the demo into a larger function that I can actually use. Given that I generate a lot of Word docs, being able to get some document statistics is helpful. So I created a function called Get-DocStatistic.

Read More

Analyze-Packet Reloaded

While getting caught up on my podcast back log I was listening to an episode of Mind of Root. In it Steven Murawski mentioned my Get-Packet and Analyze-Packet PowerShell scripts. One of his (legitimate) issues with Analyze-Packet was the way it presented results. The original version simply wrote information to the console. It didn’t use a good object model so that you could format the results the way you wanted. I took this as a challenge to improve the script.

Read More

PowerShell InputBox

The other day I gave you a function to create a VBScript style message box in PowerShell. If you find yourself needing MsgBox in PowerShell, you’re likely going to want InputBox.

Read More

New PrimalToys object for easier CSV handling

With service build 569 of PrimalScript 2007 we added a COM object that makes it easier to deal with CSV (comma separated values) data and/or files. While browsing through posts at ScriptingAnswers.com and some of Microsoft’s scripting related newsgroups I couldn’t help but notice that questions regarding CSV keep coming up. I mentioned this to […]

Read More

PowerShell and COM objects.

While developing a COM object for scripting use I wanted to provide a VBScript sample as well as a PowerShell sample. While creating the PowerShell sample I received an unexpected error message when setting a property value. Some quick review shows that PowerShell 1.0 (I did not check with the 2.0 CTP yet) cannot handle […]

Read More

Touch This

One of the last tasks for the Active Directory Powershell book was to assemble all the script samples. When the book is available you’ll be able to download a zip file from SAPIENPress.com. One thing I wanted to do was to use the file time stamp as a versioning tool.

Read More

PowerShell 101 now part of PrimalScript 2007 Enterprise Edition

As of August 1st 2008 every CD of PrimalScript 2007 Enterprise shipped will include a copy of  our PowerShell 101 Class-On-Disc. To find out more about this title please look here: PowerShell 101 If you already own PrimalScript 2007 Enterprise you can order a replacement CD with PowerShell 101 from ScriptingOutpost.com Ordering will require a […]

Read More

More Fun with Debug Messages

A few weeks ago I posted an entry on creating customized debug messages that you can use in your scripting. After some more testing and tweaking I revised and renamed the function. Write-DebugMessage can now be used within your script to send messages to the debug pipeline. I moved the $debugpreference setting to the function itself and made other improvements.

Read More

Search

Enter any query and press enter
Advanced search operators:
+ ⟶ Term must appear
- ⟶ Term must not appear
"" ⟶ Exact string must appear
How do I use these?

Join our mailing list

Enter your email address to subscribe to our mailing lists for Monthly Blog Digests, Product Announcements and more (you can choose which you receive once you sign-up!)

Tags

Categories

Archives

Dashboard