I continue to come across a particular topic in discussion forums that causes many PowerShell beginners a lot of headaches and more than a little frustration. I know I’ve written about this before and I’m sure I’ll cover it again, but when writing anything in PowerShell that you see in the PowerShell console, you have…
Tag: Scripting
PowerCLI VM Peek
Now that I believe I’ve resolved my hardware issues with my VMware server, I’m expecting to use it much more. I’m also continuing my exploration of the PowerCLI tool set which allows me to manage my virtual infrastructure from a Windows PowerShell session. One task that I frequently need is to identify which virtual machines…
Friday the 13 Script Blocks
In celebration of Friday the 13th and to help ward off any triskaidekaphobia I thought I’d offer up 13 PowerShell scriptblocks. These are scriptblocks that might solve a legitimate business need like finding how long a server has been running to the more mercurial such as how many hours before I can go home. A…
Windows Update Module
I don’t have a large environment to manage, but I do have a number of test boxes I try to keep up date using Windows Software Update Server (WSUS). Occasionally I’ve needed to manage things client-side. Unfortunately, there aren’t a lot of good tools, and nothing PowerShell-related that I’ve found so I wrote my own….
Get Your Free Scripting Toolkit
If you were at this year's TechEd event in New Orleans, I hoped you dropped by the SAPIEN Technologies booth and picked up your free Scripting Toolkit. What's that you say? Check it out on the SAPIEN blog and then download your free copy.
Mr. Roboto Scripts
I'm slowly trying to revise my main web site. The original site had a script library page where all of my old Mr. Roboto scripts resided for download. Unfortunately, in many of the online Mr. Roboto articles the link they provided doesn't work now. So if you are looking for my old scripts, use this…
Get Parameter
As I continue to work on the 2nd edition of Managing Active Directory with Windows PowerShell: TFM, I find situations where I need a tool to get information out of Windows PowerShell. For example, the cmdlets in the Microsoft Active Directory module have a lot of parameters and I wanted to know some specifics. Now…
Export-Function
I love that you can do so much with PowerShell on the fly. For example, I don’t need to launch a script editor to create a PowerShell function. I can do it right from the command prompt. PS C:\> function tm {(get-date).ToLongTimeString()} PS C:\> tm 12:41:27 PM As long as my PowerShell session is open,…
This Old Script
I’m very slowly revising my main web site. The upshot for now is that there is no direct link to my old script library. Many of my Mr. Roboto tools can be found on this page. Until I can finish the upgrade project, you can use this link, http://www.jdhitsolutions.com/scripts.htm to take you directly to the…
VMware Backup with PowerCLI and Veeam
My primary backup drive for my virtual machine backup toasted on me so I had to recreate all of my backup jobs. I’ve been using Veeam’s backup product for VMware and it couldn’t be easier to use. I’ve known that it included a set of PowerShell cmdlets but I had never really looked at them…
Out-Clip
I’ve started working on the 2nd edition of Managing Active Directory with Windows PowerShell: TFM. As with almost all of my writing projects it will be full of PowerShell code examples. In the past I’ve always relied on a manual copy and paste to add content to the manuscript. The PowerShell Community Extensions made this…
Objects are the answer
As I usually do, I was helping out in the forums at ScriptingAnswers.com. A member had several variables that he wanted to show as a group. As is almost always the case, the answer in PowerShell is object. I talk about this all the time in classes, conferences and online chitchat. Let me offer up…
New Book Project – Reviewers Needed
While at Microsoft TechEd, I signed the paperwork to write a second edition of Managing Active Directory with Windows PowerShell: TFM for SAPIEN Press. It’s hard to believe so much has happened since that book hit the shelves in less than 2 years. The 2nd edition will continue to include coverage of Quest Software’s PowerShell…
New WMI Object
I have one more variation on my recent theme of working with WMI objects. I wanted to come up with something flexible and re-usable where you could specify a WMI class and some properties and get a custom object with all the classes combined. My solution is a function called New-WmiObject. Function New-WMIObject { [cmdletbinding()]…
Content Redirection
Here’s another item I see in some submisstions of the 2010 Scripting Games that I felt I should address: the use of legacy console redirection. While technically not illegal or wrong, an example like this demonstrates (at least in my opinion) that the scripter hasn’t fully adopted the PowerShell paradigm. $computers=get-content "computers.txt" $data=foreach ($computer in…