PowerShell Team

Automating the world one-liner at a time…

Latest posts

Aug 1, 2007
Post comments count 0
Post likes count 0

Get-WmiChildNameSpace

PowerShell Team

I got sick of fiddling around with WMI namespace so I produced a really simple script to cope with this. I call it Get-WmiNamespace:  PS> cat .\Get-WMIChildNameSpace.ps1param ($Namespace="root\cimv2", $Computer=".", $Column=4)Get-WmiObject -Computer:$Computer -NameSpace:$NameSpace __NameSpace |Format-Wide -Column:$ColumnPS>PS> .\Get-WmiChildNamespace.ps1Security SMS ms_409 TerminalServicesApplicationsPS> .\Get-WmiChildNamespace.ps1 -namespace root -column 5subscription DEFAULT MicrosoftDfs CIMV2 Clinap MicrosoftIISv2 SECURI...

Jul 16, 2007
Post comments count 0
Post likes count 0

Get-Help Can't Find My Help File!

PowerShell Team

(or How to Define the Help File Name in a Custom Windows PowerShell Snap-in)   We've discovered an error in our instructions for creating a custom Windows PowerShell snap-in. This error prevents Get-Help from finding the help files for cmdlets in the snap-in. We'd like to come clean about our mistake and to warn you about the effects of copying it.   This error also revealed that custom snap-in developers determine the names of the help files for their cmdlets. As such, we need to revise our previous instructions for naming help files, because they apply only to standard snap-ins.     The Bug...

Jul 16, 2007
Post comments count 0
Post likes count 0

Working with WMI Events (2)

PowerShell Team

This post builds on Jeffrey's post on wmi events - http://blogs.msdn.com/powershell/archive/2007/01/28/working-with-wmi-events.aspx Powershell V1 does not give a cmdlet to support WMI events, I have written a simple powershell script to help users who want to write monitoring with powershell  for V1(Please see attached.) (A brief intro of WMI events at the end of the post for the uninitiated) Get-WMIEvent (or "gwe" alias) - It takes these arguments – $class – Event class$Path – Namespace path. Defaults to root\cimv2$query – Notification query$Timeout – Timeout for the query$Credential – Credentials f...

Jul 13, 2007
Post comments count 0
Post likes count 0

Congratulations to Quest Software

PowerShell Team

We just held a partner Conference in Denver. We give awards to recognize those partners that really "get it" and are able to take our technologies and use them to develop great customer solutions. Quest Software was awarded Global ISV Partner of the Year for their adoption and great use of PowerShell! Great things happen because of great people. People that hear the same thing as everyone else but are able to see an opportunity that others don't. I remember BillG once saying "vision is cheap" so just seeing an opportunity is not enough. The superstars are those people that can make visions real, to take the...

Jul 13, 2007
Post comments count 0
Post likes count 0

Virtual Server

PowerShell Team

Ben Pearce has a posted a nice deck describing how to manage Virtual Server with PowerShell. Check it out HERE. Enjoy! Jeffrey Snover [MSFT]Windows Management Partner 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

Jul 2, 2007
Post comments count 0
Post likes count 0

Cmdlets vs. APIs

PowerShell Team

Some people have asked the question, "Why Cmdlets?". If you already have a reasonable API, what is the value in writing Cmdlets? I'll provide a quick answer here but we should probably include a good write up of this in our documentation. The most important thing to realize about cmdlets is that it is all about mindset and attitude. The mindset of a cmdlet designer is that there is an "Admin at the keyboard" and the attitude is "we are going to do whatever it takes to provide that person an optimal user experience". The entire PowerShell engine is designed to make it easy for people to succeed at doing just that...

Jun 29, 2007
Post comments count 0
Post likes count 0

No PowerShell at LISA

Steve Lee

If you were thinking about attending a PowerShell talk at LISA (Large Installation System Administration conference), the answer is NO. Someone suggested that the attendee's of this conference would love a PowerShell talk so I submitted my Monad Manifesto as a draft with the thinking was that I would bring that paper up to date, provide more details etc. I'd be hard pressed to think of a topic more relevant to people managing large systems so I thought it would be a good fit. Sadly, the paper got turned down and the reject notice (below) provided feedback from various reviewers. I thought you might enjoy these a...

Jun 29, 2007
Post comments count 0
Post likes count 0

Free PowerGadgets

Steve Lee

That got your attention didn't it? The guys over at PowerGadgets have introduced a PowerGadgets MVP Program. It sounds like it is modeled a bit after the Microsoft MVP program where if you are influential within the community, you get treated really nice (read free software). They are making the program available to IT pros, software vendors, UG leaders and technology previewers – that is a pretty wide net. You can apply for a free copy HERE. If you haven't see PowerGadgets – it is definitely worth looking into. The look on people's faces the first time you show them a command line piping object into a PowerGad...

Jun 28, 2007
Post comments count 0
Post likes count 0

Do You Really Want To Use –EQ?

Steve Lee

Sebastien posted a cool simple script HERE which effectively does a reverse lookup on aliases. Here is the code: function Get-AliasShortcut([string]$CommandName) { ls Alias: | ?{ $_.Definition -eq $CommandName } } Set-Alias gas Get-AliasShortcut Notice that he used –EQ. Whenever you find yourself using –EQ, ask yourself if that is really want you want. You might be cheating yourself out of a ton great stuff. Consider changing the -EQ to -MATCH That would allow you to do: PS> Get-AliasShortcut child CommandType Name Definition ----------- ---- ---------- Alias gci Get-ChildItem Alias ls Get-ChildItem...