PowerShell: Determine Number of Parameters on Cmdlets

In PowerShell, each “cmdlet” has input and output parameters. Cmdlet definitions (including their names, parameters, parameters sets, attributes, etc.) are rich objects, just like every other object in PowerShell. Because of this, we can easily find out which cmdlets have the most parameters.

We follow this process to retrieve the information mentioned above:

  1. Retrieve a list of cmdlets available in the current PowerShell session
  2. Select the Name and parameter count (the latter, using a “calculated property” expression)
  3. Sort the results descending by parameter count

[code language="PowerShell"]Get-Command -CommandType cmdlet | Select-Object -Property Name,@{Name = 'Parameter Count';Expression = {[int]$_.Parameters.Count} } | sort 'Parameter Count' –Descending[/code]

Here is what the results look like:

Name                                                                                                    Parameter Count
—-                                                                                                    —————
New-ModuleManifest                                                                                                   38
New-PSSessionOption                                                                                                  28
Invoke-Command                                                                                                       28
Get-WSManInstance                                                                                                    28
Get-WmiObject                                                                                                        26
Set-WmiInstance                                                                                                      25
Invoke-WmiMethod                                                                                                     25
Set-WSManInstance                                                                                                    24
Register-PSSessionConfiguration                                                                                      24
Remove-WmiObject                                                                                                     23
Enter-PSSession                                                                                                      23
Import-Module                                                                                                        23
Add-Type                                                                                                             23
Invoke-WSManAction                                                                                                   23
Set-PSSessionConfiguration                                                                                           23
Copy-Item                                                                                                            22
Set-ItemProperty                                                                                                     22
New-WSManInstance                                                                                                    22
Start-Process                                                                                                        22
Get-EventLog                                                                                                         22
New-PSSession                                                                                                        22
Send-MailMessage                                                                                                     22
Rename-ItemProperty                                                                                                  21
Get-Content                                                                                                          21

ConfigMgr 2012 Beta 2: WMI Namespace Documentation

I recently put together some documentation for the Microsoft System Center Configuration Manager 2012 Beta 2 WMI provider. This is a searchable, formatted Excel document that displays all the classes, properties, and methods for the SCCM 2012 provider. Hopefully this will help you to find the proper information for writing custom scripts and so on.

http://dl.dropbox.com/u/18088468/SCCM%202012%20WMI%20Namespace%20Documentation.xlsx

Please provide feedback if this was helpful, or if you’d like to see something else added to it!

Dell Updates Client Configuration Toolkit (CCTK)

Dell has just recently updated the Client Configuration Toolkit (CCTK). CCTK is a well-documented command-line tool that allows IT administrators to manage hardware-level settings via script / batch. It uses a Hardware API (HAPI) driver, which can be dynamically installed at runtime, to make changes to the system’s BIOS / UEFI firmware configuration.

Download the Dell CCTK 2.0.1

The new publish date for this updated software is 7/25/11, and it is version 2.0.1. I’ve included the changes from the release notes below:

DELL CLIENT CONFIGURATION TOOLKIT

Version 2.0.1
Release Notes

********************************************************************************

What’s New in This Release
————————–
* Support for new BIOS options, ‘optimus’ , ‘controlwwanradio’ and
  ‘controlwlanradio’. For more information run the following commands
  – cctk.exe -h –optimus
  – cctk.exe -h –controlwwanradio
  – cctk.exe -h –controlwlanradio

* Support for additional arguments in the BIOS option, ‘keyboardillumination’.
  For more information, run the below command
  – cctk.exe -h –keyboardillumination

* Packaging CCTK installation file as a Dell Update Package (DUP) to:
  – simplify upgrade and installation of CCTK  in one-to-many environments
  – return Dell standard installation codes to simplify scripting for mass
    distribution
 
********************************************************************************