I’m not sure why the registry has been on my mind lately. I probably need a vacation to get out more. But I put together a relatively simple Windows PowerShell function to retrieve registry statistics that you might find useful. My Get-Registry function will return information about the size of a registry as well as…
Tag: PowerShell
Start-TypedDemo
As you know, I do a lot of presenting and training. Normally I use the ubiquitous Start-Demo function to run through a demo list of commands. Most of this time this works just fine. But when I’m doing videos, especially for a video project, I want the viewer to focus on the command and not…
Friday Fun Randomness Abounds
I find it a little ironic that although I like efficiency, structure and order I’m fascinated with randomness. In today’s Friday Fun I want to explore a few ways you might incorporate randomness into your PowerShell scripting. Perhaps you need a random number between 100 and 500. Or a string for file name. There are…
Create a Master PowerShell Online Help Page
As I hope you know, PowerShell cmdlets can include links to online help. This is very handy because it is much easier to keep online help up to date. To see online help for a cmdlet use the -online parameter. get-help get-wmiobject -online I decided to take things to another level and create an HTML…
Deep Dive Formatting and Type Extensions
At the PowerShell Deep Dive, I did a short presentation on using format and type extensions. There was a lot of demo crunched into a very short period of time. Needless to say this is a complex topic that we could spend a lot of time on. But for now, let me share my slide…
PowerShell Deep Dive Treasure
Without a doubt the PowerShell Deep Dive conference was one of the best meetings I’ve ever attended and I wanted to share one tidbit I came away with that I find immensely useful and never knew. During one of Bruce Payette’s talks he tossed out, practically as an aside, a reference to searching command line…
Scripting Games 2011 Beginner Event 5 Commentary
My commentary for Beginner Event 5 in the 2011 Scripting Games is now available. One item that seems to be missing on the ScriptingGuys site is my complete solution so I thought I would share it here, plus a variation.
Get Common Data
While judging entries in this year’s Scripting Games I realized there were some common properties that were repeatedly used. This got me thinking about a simple way to retrieve that information with a single command Then you could access the data values from within your script. I’ve put together a relatively simply function called Get-Common…
Friday Fun The Scripting Geek is Here
I am proud (and a wee bit nervous) to announce the arrival of ScriptingGeek.com, a site devoted to the lifestyle of your favorite scripting geek – you! My goal is to provide a one stop shop for anything scripting related. Currently www.ScriptingGeek.com will direct you to an online store that offers tshirts, sweatshirts, hoodies, coffee…
What Made the Scripting Games Easier
I can easily say that the quantity and caliber of script submissions in this year’s Scripting Games has been amazing. I congratulate all of you on your hard work and trust it will pay off. I’d say a primary goal is education. Not only will you pick up tips from the judges but also from…
Convert Aliases with the Tokenizer
Last week I posted a function you can use in the Windows PowerShell ISE to convert aliases to command definitions. My script relied on regular expressions to seek out and replace aliases. A number of people asked me why I didn’t use the PowerShell tokenizer. My answer was that because I’m not a developer and…
Scripting Games 2011 Notes from the Field
I’ve been making headway in reviewing and judging entries in the 2011 Scripting Games. I know there has been a lot of discussion about the lack of comments and I’m doing what I can with entries I judge, but I’m not guaranteeing anything. What I will do is put down some overall comments and impressions…
PowerShell ISE Convert All Aliases
Yesterday I posted an article on how to convert a selected word to an alias or cmdlet. While I think there is still some value in this piecemeal approach. sometimes you want to make wholesale changes, such as when troubleshooting a script that someone else wrote that is full of cryptic aliases. I have a…
PowerShell ISE Alias to Command
Earlier this week I posted a function that you could incorporate into the PowerShell ISE to convert selected text to upper or lower case. I was challenged to take this a step further and come up with a way to convert aliases to commands. Which is exactly what I did.
PowerShell ISE Case Closed
When writing a PowerShell script or function, things like indentations, white space and case make a big difference in how easy it is to read and understand your code. Sometimes it can be helpful to have a word or sentence in all upper case so that it stands out. Here is a simple set of…