-
The other day I came across a PowerShell question on StackOverflow about testing if a service was running on a group of machines.This sparked an idea for a tool to “ping” a service, in much the same way we ping … Continue reading →...
-
I use hash tables quite a bit and with the impending arrival of PowerShell 3.0 I expect even more so. PowerShell v3 allows you to define a hash table of default parameter values. I’m not going to to cover that … Continue reading → Read...
-
Ever since PowerShell v3.0 CTP build got released, I am using ISE as my primary script editor. I keep changing preferences such as colors, etc. The new feature in ISE v3 remembers the changes made to ISE options. While this is quite useful, sometimes...
-
A few days ago Boe Prox posted some very nifty PowerShell modules for using the title bar as a ticker for RSS feeds like the weather. I thought this was an awesome idea and an easy way to take advantage … Continue reading → Read More...
-
Recently I was tracking down a bug in script for a client. The problem turned out to be a simple typo. I could have easily avoided that by using Set-StrictMode, which I do now, but that’s not what this is … Continue reading → Read More...
-
This past weekend I did an online presentation for a friend of mine who teaches for ITT in Omaha, Nebraska. He wanted me to do a brief talk about what PowerShell is and show how to use it, especially for … Continue reading → Read More...
-
The Import-CSV cmdlet in PowerShell is incredibly useful. You can take any CSV file and pump objects to the pipeline. The cmdlet uses the CSV header as properties for the custom object. PS S:\> import-csv .\testdata.csv Date : 1/18/2012...
-
This short post shows yet another ISE addon to quickly move to the ISE v3 combined pane input section. Read More...
-
I’ve had a few comments and emails lately about my post and script on converting text to objects. I decided the function needed a little more lovin’ so today I have an updated version, complete with comment based help. Function … Continue...
-
I have a few scripts that are thousands of lines long. When working with these scripts in ISE, I often start modifying some part of the code and then use scroll bar to move up and down to refer to other parts of the code. In this process, I naturally...
-
I love how easy it is to manage computers with Windows PowerShell. It is a great reporting tool, but often I find people getting locked into one approach. I’m a big believer in flexibility and re-use and using objects in … Continue reading...
-
Here’s a technique you might want to use for ad hoc troubleshooting or reporting. Even though it is possible to set up scheduled tasks to run PowerShell commands or scripts, it is cumbersome and time consuming. PowerShell v3 offers a … Continue...
-
I’ve been working on a question in the forums at ScriptingAnswers.com and the need arose to create a folder name with a 4 digit number. But the number needed to have enough leading zeros so that the number was always … Continue reading →...
-
When mounting VHD files on Windows 7 or Windows Server 2008 R2 using Diskpart, we always find it difficult to see the newly added drive letter. This trick using WMI events helps you get the newly added drive letter. Read More...
-
When working in PowerShell, and especially when scripting, you might want to give the user a choice of actions. For example, you might develop a configuration script that another admin or technician will run. Perhaps one of the steps is … Continue...