Populating dropdown lists in PowerShell

Populating a second dropdown list based on your choice in the first dropdown list

Following on from my post yesterday in the week regarding the creating of forms in PowerShell, I came across a situation that I need to work on. I have a form that contains 2 dropdown lists. The first list contains a list of all the volumes that are on my NetApp filer. The second list is populated with a list of all the snapshots from which ever volume I choose in the first list.

When I change my choice in drop-down list 1, I want to see the contents of list 2 change and reflect my choice by listing the snapshots of the selected volume.

So here is the code:

As always, feel free to play/modify the code and have fun.

For more information on using PowerShell to create forms:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.