A question went out today about what authors of the forthcoming PowerShell Deep Dives book would be at the PowerShell Summit. We’re hoping to have the book out by then so you can get you hands on it. From what I can tell these authors will be at the summit: Adam Driscoll Jason Helmick Jeffery…
Tag: PowerShell
PowerShell in the Big O
I am speaking at SQL Saturday #197 in Omaha, NE on Saturday, April 6th. But even better, I will be doing a full day pre-conference session on Friday. The title of my session is Prof. PowerShell: or How I Learned to Stop Worrying and Love PowerShell. For those of you who don’t know, Omaha (ok,…
On the Road
After a long winter I think is time for a road trip. I will out and about over the next few months, hopefully speaking at an event near you. Many of the events are free or charge a small fee, but all I hope will be worth your time. These are the events I can…
PowerShell Morning Report with Credentials
I had an email about trying to use my Morning Report script to connect to machines that required alternate credentials. For example, you might have non-domain systems in a DMZ. Fair enough. Since most of the report script uses WMI, it wasn’t too hard to add a Credential parameter and modify the WMI code to…
Set GPO Status with PowerShell
Last week I dropped in on a class Jeremy Moskowitz was teaching on Group Policy to talk a little PowerShell. I was demonstrating the Get-GPO cmdlet and talking about the object you get back and how you can use it to filter and create reports. One of the attendees asked about changing the status. What…
Friday Fun A Graphical PowerShell History Picker
One of my favorite features in PowerShell 3.0 is that you can select items in Out-Gridview which will then pipe the object back to the pipeline. One way I’ve been using this is as graphical “picker” for command history. I use Get-History, actually its alias h, all the time. Once I know the history number…
Find Files with PowerShell 3.0
My last few articles have looked at using WMI and CIM_DATAFILE class to find files, primarily using Get-WmiObject in PowerShell. But now that we have PowerShell 3.0 at our disposal, we can use the new CIM cmdlets. So I took my most recent version of Get-CIMFile and revised it specifically to use Get-CimInstance. I also…
Find Files with WMI and PowerShell Revisited
Last week I posted a PowerShell function to find files using WMI. One of the comments I got was about finding files with wildcards. In WMI, we’ve been able to search via wildcards and the LIKE operator since the days of XP. In a WMI query we use the % as the wildcard character. Here’s…
Building Excel Reports with PowerShell
Last year I wrote a series of articles for the Petri IT KnowledgeBase on using Microsoft Excel with PowerShell. Today I received an email from a reader who had a question about article that showed how to build a drive usage report in Excel. In the article I suggest it wouldn’t be too difficult to…
Find Files with WMI and PowerShell
Finding files is one of those necessary evils for IT Pros. Sometimes we’re searching for a needle in a haystack. And it gets even more complicated when the haystacks are on 10 or 100 or 1000 remote computers. You might think using Get-ChildItem is your only option. Certainly it works, but if you are searching…
Rename Hashtable Key Revised
Last week I posted an advanced PowerShell function to rename a hashtable key. As usual, the more I worked with it the more I realized it was missing something – namely the ability the take a pipelined object. My original version assumed you had saved the hashtable to a variable. But as I was working…
Join PowerShell Hash Tables
I received a lot of feedback and interest in my ConvertTo-Hashtable function. One question I received was “Why?” Well, one reason might be that you want to combine two objects into a single object. Joining them as two hashtables makes this an easier process. First off, combining two hashtables is as simple as adding them…
Convert PowerShell Object to Hashtable Revised
A while back I posted an advanced PowerShell function that would take an object and convert it to a hashtable. The premise was simple enough: look at the incoming object with Get-Member to discover the property names then create a hashtable with each property name as a hashtable key. I’ve a need to use this…
Silly Saturday PowerShell Palindromes
Normally I post amusing PowerShell-related content on Fridays as part of my Friday Fun series. These are light-hearted articles about using PowerShell. Almost always they are not practical but they serve as a learning vehicle. My topic this week seems extra silly so I’m moving it to Saturday. I’m a pushover for alliteration. Last week…
Rename Hashtable Key
I use hashtables quite a bit. Often generating hashtables on the fly from other sources. But sometimes the hashtable keys that come from these external sources don’t align with what I intend to do with the hashtable. For example, one of the nifty things you can do with hashtables is splat them against a cmdlet…