Automating the world one-liner at a time…
Version 1.1 of the PowerShell Community Extensions has just been release so I decided to kick the tires. After I installed it, I noticed that some conflicts and then realized that there might be conflicts between my customizations and the Aliases, Functions and Cmdlets that they delivered. Here is how I detected what needed to be resolved:
PS> gcm -type cmdlet,function,alias |group name |where {$_.count -gt 1}Count Name Group----- ---- ----- 2 Get-FileVersionInfo {Get-FileVersionInfo, Get-FileVersionInfo} 2 help {help, help} 2 man {man, man} 2 mkdir {mkdir, mkdir} 2 ql {ql, ql} 2 qs {qs, qs}PS> gcm qsCommandType Name Definition----------- ---- ----------Function qs "$args"Alias qs Quote-String
Is that cool or what? Man I love PowerShell!
Enjoy.
Jeffrey Snover [MSFT]Windows PowerShell/MMC ArchitectVisit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Easy to query, yes, but solving the problem is somewhat inelegant as noted here http://ps1.soapyfrog.com/2007/03/06/cmdlet-clashes/
Thanks for the nod Jeffrey! You certainly have a lot of readers; we're currently getting downloaded at a rate of five to ten a MINUTE. I've never been more afraid of [potential] bugs in my life!...
- Oisin
====================================
http://www.codeplex.com/PowerShellCX
http://www.codeplex.com/PSSharePoint
If you find this topic interesting check out my post on how we generated docs on all the new features in PSCX 1.1 (sans providers - although with just a tiny bit more code we could have automatically determined that also - doh!):
http://keithhill.spaces.live.com/blog/cns!5A8D2641E0963A97!717.entry