foreach( $ps in $par.ParameterSets ) { $ps.Name; foreach( $p in $ps.Parameters ) { "`t" + $p.Name } }
From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Connolly, Peter Sent: Tuesday, September 10, 2013 1:45 PM To: exchange@lists.myitforum.com Subject: [Exchange] list all parameters of a commandlet All, I am trying to list all parameters of a commandlet. For instance: $par = get-command set-mailbox $par.ParameterSets | fl But the output looks something like this: Parameters : {ManagedFolderMailboxPolicyAllowed, MaxSendSize, CalendarVersionStoreDisabled, MailTip, ArchiveName, AuditLogAgeLimit, Name, SecondaryAddress, CustomAttribute6, SCLJunkEnabled, SendModerationNotifications, RemoveManagedFolderAndPolicy, GrantSendOnBehalfTo, Arbitration, MailTipTranslations, CustomAttribute1...} I am looking for an easy way to list the parameters without all the clutter that get-help yields - thanks! Peter