Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > Dynamic Parameter Validation in PowerShell
June 22
Dynamic Parameter Validation in PowerShell

Hello, SharePoint and PowerShell enthusiasts! Todd Klindt here, and I've got something exciting to share with you today. I recently had the opportunity to present a developer-focused demo on the Microsoft 365 & Power Platform Community channel. The topic? Dynamic parameter validation in PowerShell.

In this 13-minute demo, I walk you through the process of creating your own PowerShell cmdlet. This cmdlet allows you to pull and tab through information from a site, list, text file, Azure, Graph, etc. within the PowerShell environment.

I utilize the power of ValidateSet, ValidateScript, and ArgumentCompleter. To show off, the demo concludes with an interesting twist. I used ChatGPT to write the same code.

All the code I used in the demo is available on my GitHub repo. You can find it at PoshPnP and PnP PowerShell.

I hope you find this demo useful in your PowerShell journey. Remember, when you're writing PowerShell, try to be the tool maker, not the tool user. Happy coding!

Watch the full video here.





Thank you for sharing this blog It is my opportunity to read and to be updated. 
 on 8/26/2023 2:49 PM


Thank you for sharing this blog It is my opportunity to read and to be updated.
 on 8/26/2023 2:49 PM


Thanks for sharing this cool blog. Keep posting.
 on 8/26/2023 2:52 PM


I'd personally declare that will this is the a terrific article of an wonderful man or woman, i am just very happy to discover this specific.Business News
 on 9/5/2023 6:20 AM


Cheap content, With thanks just for stating This approach skills. Wonderfully developed page, only if all of the the blogosphere obtainable the equivalent degree content and articles simply because, websites became a more desirable space. Delight continue! broken planet tracksuit
 on 9/6/2023 6:08 AM

Re: Dynamic Parameter Validation in PowerShell

Reserve Residences Condo™ @ Bukit Timah - Where Style Meets Comfort Discover the perfect blend of style and comfort at Reserve Residences. Explore Reserve Residences Showflat, get developer pricing details, and book an appointment to visit us today.Reserve Residences Condo
 on 9/11/2023 7:42 AM


When i got onto your blog site though putting attention simply just a little bit submits. Pleasant strategy for future, I will be bookmarking at a time get ones finish springs up. Young athlete personal training in Altamonte Springs
 on 9/12/2023 8:37 AM

poppy playtime

Very interesting blog. A lot of the blogs I see these days don't really offer anything that interests me, but I'm definitely interested in yours. provided me with a lot of valuable information. If you have more time, please visit:
 on 9/12/2023 11:42 PM

Re: Dynamic Parameter Validation in PowerShell

This is probably the results We're getting all over. With thanks for your personal site, I sign up to your website. This is usually a awesome site. inches.okcontent
 on 9/17/2023 1:51 AM

Re: Dynamic Parameter Validation in PowerShell

This really is awesome publish as well as i love to to learn this particular publish. your website is actually wonderful and also you possess great personnel inside your weblog. good discussing stay the best.viewpointm
 on 9/18/2023 9:09 AM
1 - 10Next

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.


Body *

Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person


Want a message when I reply to your comment? Put your Twitter handle here.