Ok, I’ll be the first to admit you might not find a production use for this tip, but that’s what makes it fun. Interactively, you can always hit the up arrow to get the last command in your command buffer. But what if you are running a script and for some reason want to re-rerun…
Category: PowerShell
Friday Fun PowerShell PowerBall Numbers
Like many of you, I dream about hitting the lottery and retiring to live the good life. Unfortunately I rarely play so I guess my odds are winning are pretty slim. But for the latest installment of Friday Fun, I thought I would have PowerShell help me pick some numbers for PowerBall. It is not…
Get Properties with Values
One of my nuisance issues when using WMI with Windows PowerShell, is that when looking at all properties I have to wade though many that have no value. I’d prefer to only view properties that have a populated value. Here’s one way.
ScriptingGeek Savings This Weekend
This weekend you can save some money on gear and tees from ScriptingGeek.com. Coupon Code: StarSavings Discount: $5 off any order! Coupon Code: BrightSavings Discount: $10 off subtotal of $50+ Coupon Code: SpangledSavings Discount: $30 off subtotal of $100+ Disclaimer: Please enter coupon code StarSavings, BrightSavings, or SpangledSavings before completing checkout. Discount is applied to…
ScriptBlocks On the Fly
I’m always preaching about writing PowerShell scripts and functions with reuse and modularization in mind. You should never have to write the same block of code twice. But what about in the shell during your daily grind? Perhaps today you’re dealing with some issue and periodically need to run a particular block of code. Now,…
Get GPO Backup
The GroupPolicy module from Microsoft offers a great deal of functionality from a command line. In terms of regular maintenance or administration it is pretty hard to beat, especially if you have 100s or 1000s of GPOs. When you have such a large number, backing them up is critical and easy to accomplish with the…
Get Process Detail
The other day I posted a snippet of code that I as using to monitor process memory utilization for a few web browsers. I thought the information and technique were useful enough to modularize in the form of a function. Perhaps I want to check working set on a different process or even on a…
Process Snapshot
Yesterday I ended up running an impromptu browser test, comparing memory utilization. See what Twitter can do to your time!! The browsers themselves are really irrelevant. What you might find useful is the little PowerShell code I put together to periodically check and compare the browser processes.
Get Registry Size and Age
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…
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…
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.
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…
Friday Fun PowerShell Pep Talk
Today’s Friday Fun is meant to help get you excited about the upcoming Scripting Games. I want to add a little pep to your PowerShell prompt. Perhaps it will even keep you motivated. What I have for you today are variety of prompt functions. Consider them variations on a theme.
New Comment Help
If you follow my blog I’m sure you noticed that I post a lot of advanced functions and scripts. While I don’t expect every one to be developing advanced functions, the closer you can get the more powerful your work. With the Scripting Games approaching I thought I’d offer up a little something to help…
Get Password Will Expire
During my Managing Active Directory with Windows PowerShell session at Techmentor Orlando, an attendee asked about finding when a user’s password would expire. He wanted to be able to come in on Monday morning and run a report to find whose passwords were going to expire during the week. I didn’t have the time to…