Comments on: Practical PowerShell: Functions & Parameterization https://practical365.com/practical-powershell-functions-parameterization/ Practical Office 365 News, Tips, and Tutorials Thu, 11 Jul 2024 19:36:13 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Michel De Rooij</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_290764'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_290764"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Michel De Rooij</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/practical-powershell-functions-parameterization/#comment-290764 Sat, 23 Mar 2024 09:44:33 +0000 https://practical365.com/?p=60645#comment-290764 In reply to Robert Eder.

Thanks for the feedback. All valid points, but given the intended audience I’m not throwing everything on the table at once.
In the Script example, I referred to the article on Learn containing all the validation options.

]]>
By: Robert Eder https://practical365.com/practical-powershell-functions-parameterization/#comment-290722 Fri, 22 Mar 2024 17:38:59 +0000 https://practical365.com/?p=60645#comment-290722 Great article. I’d also suggest adding [ValidateNotNullOrEmpty()] or [ValidateNotNull()] to the Process-Mailbox function to prevent someone from passing a null value even after making it a required parameter resulting in all mailboxes being hidden. Taking it one step further, implement whatif and set ConfirmImpact in CmdletBinding so that a user is prompted to give the user the opportunity that they may be making an oops.

]]>