For some time now I have been keeping an eye on a community effort to create an open source extension that enhances the level of functionality within PowerShell. This effort is called the PowerShell Community Extensions or PSCX for short. This extension contains a number of additional cmdlets, providers, aliases, filters, functions and scripts that can all be used to enhance your PowerShell experience. You can access this wonderful effort via the following URL: http://www.codeplex.com/PowerShellCX Installing and using the extension is a breeze. All you need to do is download the installer, execute it, have it configure a profile (that’s loads its snap-in), or load the snap-in yourself via your own profile. For example, you might use the following command: Add-PSSnapin PSCX It is important to note that this command only loads the PSCX snap-in. This snap-in gives you access to a number of new cmdlets and providers that further enhance your automation experience with PowerShell. For example: cmdlets • Ping-Host (used to ping hosts) • Send-SmtpMail (used to send emails from PowerShell) • Write-Zip (used to create a zip file from the parameters or the pipeline) • Get-DhcpServer (get a list of authorized DHCP servers in an AD forest) • … The list goes on … Providers • AssemblyCache (access to the .NET Global Assembly Cache and the assemblies it contains.) • DirectoryServices (access to LDAP servers) • FeedStore (access to the Internet Explorer 7 RSS feed store) But, that is not all. As noted above, with the PSCX you also get a bunch of aliases, filters, functions and scripts that you can also use. These items are located in the following path: C:Program FilesPowerShell Community Extensions If you want the aliases, filters, and functions loaded into your PowerShell session each time you load up your console. Then I suggest looking at the profile samples that come with the PSCX. These profile samples are cleverly located in the Profile folder and by using these samples you should be able to rig up a smashingly grand profile. Overall, the PSCX has something for everyone and using it can only further enhance PowerShell experience. My only complaint, nothing in the package is signed. :Microsoft Subnet
Extending PowerShell
Analysis
Jun 4, 20072 mins




