While building a script to help out a reader of this blog, I came up with a handy little cmdlet to retrieve the parameters of a cmdlet and place them into a collection. Function Get-ParameterList { [ cmdletBinding () ] Param ( $Cmdlet ) Write-Verbose "== Cmdlet: Get-ParameterList ==========================" Write-Verbose "Parameter - `$Cmdlet: $Cmdlet " $List = ( get-help $Cmdlet -parameter * | Select-Object -Property Name | ForEach -Process { $_ . name}) Write-Verbose "Sending $( $List . count) Items to the pipeline." Write-Output $List Write-Verbose "__ End Function: Get-ParameterList ____________________" <# .SYNOPSIS Extracts cmdlet parameters .DESCRIPTION Extracts the parameters from a supplied cmdelt and sends then as a collection into the PowerShell Pipeline. .PARAMETER Cmdlet Th
Welcome to the blogsite of MCTExpert. I am a Microsoft Certified Trainer. Here you will find the real questions that are asked to me by my students.