-
I have a quick post today on using WMI to list members of the local administrators group. It is very simple to get the group itself with the Win32_Group class. PS S:\> get-wmiobject win32_group -filter "name='Administrators'" Caption...
-
Fellow PowerShell MVP Jeff Hicks posted a nice script to find all functions and filters in an ISE script and show the same in a GUI dialog. Jeff used Regex to figure out the function and filter details. This got me thinking. Why can't we do the same...
-
Probably like many of you I keep almost all of my scripts in a single location. I’m also usually working on multiple items at the same time. Some times I have difficult remembering the name of a script I might … Continue reading → Read...
-
An if statement is used to test a condition and if is true do one thing and do another if it is false. It can be written generically as if (<condition>){ do stuff} else {do other stuff} Sometimes we need to test numerous alternatives. We could use...
-
The next step on our journey to an alternative configuration is setting the NIC to use DHCP I will keep cheating for now and specify the NIC – on my machine I now it is the NIC whose Win32_NetworkAdapterConfiguration has an Index of 7 $index = 7 Get-WmiObject...
-
Over the last few weeks I’ve posted articles on the different parameter validation options in Windows PowerShell. More than one person suggested consolidating the articles. That seemed like a good idea. There were a variety of ways to handle this...
-
I’ve been writing about the different parameter validation attributes that you can use in your PowerShell scripting. One that I use in practically every script is [ValidateNotNullorEmpty()]. This validation will ensure that something is passed as...
-
I spoke this past weekend at a SQL Saturday event in Rochester, NY. My first SQL Saturday event and it was a lot of fun. A great turnout and some very interested attendees. I did three PowerShell sessions on jobs, … Continue reading → Read...
-
At the PowerShell Deep Dive in San Diego, I did a lightning session showing off something I had been working on. Sometimes I don’t know what possesses me, but I felt the need for a better way to navigate my … Continue reading → Read...
-
I continue to tinker with Office applications and Windows PowerShell. I was looking at an Excel issue related to opening a new workbook. To verify the problem wasn’t PowerShell related I offered a suggestion to try creating an Excel workbook …...
-
Last week at the PowerShell Deep Dive in San Diego, I did a short presentation on integrating Microsoft Office applications like Excel and Word with Windows PowerShell. I easily could have spoken much longer and probably tried to cram too … Continue...
-
The games are over for another year. The number of entries was huge – 150% increase over last year. Congratulations to the winners and to everyone who took part. One thing I noticed was the number of scripts that made testing booleans harder than it needed...
-
PowerShell 3.0 introduced updateable help feature because of which there is no in-box help. We need to use Update-Help and Save-Help cmdlets to update the help content from Microsoft download sites. Now, this is a great feature to help people get up-to...
-
The weekend of April 21/22, 18 hearty IT Pros and I spend two days looking into PowerShell. A jump start look at all the key aspects of Windows PowerShell. The event focused on the core aspects of PowerShell – Cmdlets, the Pipeline, Objects, and Remoting...
-
< # .SYNOPSIS This script shows the DNS Configuration of NICs in your system .DESCRIPTION This script is a re-write of an MSDN Sample using PowerShell./ The script gets...