Category Archives: Scripting

Hashtables: Adding, Updating and Removing Items

To help describe these concepts, I have listed a few examples based on a CSV file containing HTML color codes. For purposes of sample data, create an array object of colors and HTML color codes. $colorCodes = Import-Csv ColorCodes.csv Define … Continue reading

Posted in Scripting | Leave a comment

Hashtables: Performance

In the previous post I provided a quick introduction to creating and using a hashtable object. If you are paying attention, you might have asked “Why would I go to extra work to create a hashtable when I can make … Continue reading

Posted in Scripting | Leave a comment

Hashtables: Introduction

I was recently working on a script for a co-worker who is trying to learn more powershell. In the script I had used a couple of hashtables to store information…which caused a couple of questions as he was reviewing the … Continue reading

Posted in Scripting | Leave a comment

Using ADSI to clear an attribute

I have many scripts that write information into Active Directory. Sometimes I need to do the opposite — remove or blank out an attribute. All of the following examples will require a distinguishedName value in AD, so I will set … Continue reading

Posted in Messaging, Scripting | 2 Comments

Remove vCenter Scheduled Tasks with PowerCLI (Part 3)

In my most recent series on vCenter Scheduled Tasks with PowerCLI, I have provided three functions…Get-VIScheduledTasks, Get-VMScheduledSnapshots, and New-VMScheduledSnapshot. To complete the series, I have a final function Remove-VIScheduledTask. I don’t really see the need for this one, as you … Continue reading

Posted in Scripting, Virtualization | 2 Comments