Archive for November, 2007

Debug in PowerGUI - deploy in Specops Command

Guys at Specops have just released an updated version of their flagship product - Specops Command - and it is integrated with PowerGUI.

Here’s how the integration works:

1. You start Specops Command and create a group policy containing a PowerShell script.

2. You click the Edit in PowerGUI button below the text box (see the screenshot below):

Specops Command PowerGUI integration

3. The script opens in PowerGUI Script editor in which you edit and debug the code.

4. Once you are happy with the code, you click Save and close the editor. The script gets automatically updated in Specops Command.

5. You target the policy to the computers in the network on which it should be run, and the script gets deployed.

I think this is an incredible better-together story, allowing you to have the best of both worlds: full-features debugging in PowerGUI editor, and then scalable deployment across the network through Specops.

Good job by both teams!

Tags: , , ,

Pictures from IT Forum PowerShell Dinner

PowerShell community dinner at IT Forum (Barcelona) this year was a blast. We had incredible representation from Microsoft (Kenneth and Jeffrey from the product team, James and Marcel from Europe), vendors (Tobias from Shell Tools, Thorbjörn and Magnus from SpecOps, Chris from SAPIEN, myself from Quest, Thomas from Global Knowledge), and the community (Richard from UK usergroup, Rolf from the German one, Marc aka MoW, Austin, and obviously everyone mentioned in the other 2 categories).

I hoped we could publish the pictures at http://PowerShellCommunity.org - but it looks like it is not that easy to integrate a photo albumn into the site, so we just published them in the public domain.

Here are the ones from Tobias (I simply uploaded them to my picasa album):

PowerShell dinner albumn by Tobias

And the ones from Austin:

PowerShell dinner album by Austin

The dinner was absolutely fantastic and the atmosphere we had at the dinner totally incredible. We obviously missed the guys who could not make it to the IT Forum this year - but, hey, PowerShell dinners have become the must have event on every major Microsoft conference so we’ll see you there next time!

Tags: , , ,

Platforma 2008 (Russian TechEd) PowerShell webcast

I got to Platforma 2008 (aka TechEd Russia). The conference was sold out way before it started (as it seems to be happening with all Microsoft conferences). There are so many attendees that I could not get into the Auditorium for the keynote and am sitting now watching Eric Rudder’s keynote from an overflow area.

For those, who could not get to the conference but would like to see the sessions - they are all webcasted at Platforma 2008 Online.

My session (obviously on Windows PowerShell) is tomorrow (Wednesday, Nov 2 8) at 4 pm Moscow Time. If you are at the conference please stop by. If not - join the webcast.

Tags: , , , ,

PowerShell mandatory after June 30, 2008

This kind of was mentioned by Richard and Don, but I thought I would spell it out explicitly. According to Jeffrey Snover, PowerShell is becoming a part of the Common Engineering Criteria (CEC) 2009 at Microsoft. Meaning that every server product released by Microsoft in their financial year 2009 (which starts July 1, 200 8) needs to ship with PowerShell support.

Of course, a product can get an exemption, and of course support can vary to something as advanced as Exchange 2007 cmdlets, or as basic as PowerShell in SQL 2008, but nevertheless this is a huge success for PowerShell. After all, it was similar requirement for MOM report packs which made Operations Manager so ubiquitous.

According to Jeffrey, there are currently 20 Microsoft teams working on PowerShell support in their products, and then there are VMware, and Citrix, and Quest, and /n Software, and PowerGadgets, and many more vendors adding PowerShell to their stuff.

In my opinion, within the next couple of years this will lead to a dramatic standardization in IT manageability.

Tags: ,

PowerGUI auf Deutsch

Thanks to the contribution from the German/Austrian/Swiss PowerShell Usergroup, PowerGUI is now also available in German! To get the UI localized just install this localization pack on top of PowerGUI 1.0.12 (or later ;)) and if you computer’s locale is German the UI will switch automatically!

PowerGUI Welcome Screen in German

PowerGUI Editor in German

Now that the German guys have done all the heavy lifting, if you are from Japan, France, Russia, or any other non-English-speaking countries, willing to make PowerGUI talk your mother tongue, feel free to drop me a line. ;)

Tags: ,

New free PowerShell debugger

Today is a milestone in our PowerGUI development. We have just released version 1.0.12 with PowerShell debugger built into the script editor.

So now not only can you edit the scripts but also debug them, set breakpoints, go step-by-step, see the values of the variables, and much more:

PowerGUI PowerShell IDE script editor and debugger

Building a debugger is not an easy thing so I am sure we have plenty of room for improvement in this v1 release. So if find any bugs or have great enhancement request - please don’t hesitate to file them to the discussion forums.

1.0.12 has more than just the debugger, and I will blog about other new features later this week. At the moment, I am just too excited to go into details.

The big picture is: Great admin UI and a full PowerShell IDE and did I mention they are free and available for download?

Tags: , , ,

Caching data inside PowerGUI

Warning: This is a pretty technical how-to post for those extending PowerGUI. :)

Now to the topic. PowerGUI is extremely honest. All it does to the system is just running PowerShell commands and giving you the outcome (and the code). This is great, but sometimes it can also be slow.

The upcoming 1.0.12 release is improving the performance quite a bit by re-using the collection of objects it already retrieved when you click on any of the headers to do a sort, or when you filter the data, or when you click any action or link. So for example, if you click Processes and then do something with the processes you retrieved, PowerGUI will not call Get-Process again, but will do sort, filter or some kind of pipelining on the collection you’ve already got.

The one situation in which this does not help is getting back to a node after you navigated away from it. Each time you click a node, PowerGUI is re-retrieving the data. There are situations in which you don’t need this (when the data is not that dynamic) so in this post I will show how you can make PowerGUI cache the data instead.

The example below is the code for a sample script node which I created to retrieve local system processes only the first time you click it and then on each subsequent click just use the previously cached collection:

# Cached Processes node to demo caching techniques in PowerGUI 1.0.11-12
# Try loading previously cached data
$ProcessesCache=[System.AppDomain]::CurrentDomain.GetData(ProcessesCache);

# If no cache available query the servers
if ($ProcessesCache -eq $null) {
    $ProcessesCache = Get-Process
# Store the collection in cache
[AppDomain]::CurrentDomain.SetData(ProcessesCache, $ProcessesCache);
}

# Display results
$ProcessesCache

The code above will try to load a previously cached collection and only make the actual system code if the collection is not available in cache (-eq $null). This will make PowerGUI only make the call the first time you click the node after starting the tool.

Depending on how static your data actually is you might want to add some Refresh logic into your links, actions, etc.

In the future releases we will probably make caching even easier but this should let you start using it today without waiting for us (like folks like Antonio are apparently already doing)

Tags: , , , ,

SQL PowerShell details revealed

Kirk, Richard, and Jeffrey have already blogged that SQL 2008 is (unless this gets canceled) going to have PowerShell support built in. Today on the last day of the IT Forum we learned the details. And frankly were not impressed. At least Richard and I - who were sitting on the front row and were ranting so much that Bob Beauchemin stopped giving us a word at some point (just kidding, Bob had this talk kind of imposed on him and did his job quite well despite not really being a PowerShell guy.)

Anyways, here are the details:

PowerShell is likely to debut in SQL 2008 in CTP 6 in February 2008.

What they will ship is a provider which will allow you to browse SQL databases and tables as a file system.

The provider will not give access to the actual data in the databases: only to the structure (down to columns) and configuration settings

You are not able to create items (tables, columns, rows) or copy them.

Changing any settings is very unintuitive because they have to be done via properties of objects. So you have to first cd into the database/table/column, and then do something like dir | foreach-object { $_.Method (parameter1, parameter2, etc.) } - this is not only lengthy but also not quite in line with PowerShell discoverability as you get no help or tab-completion for such calls.

A much better approach would have been a set of cmdlets but this was not the way selected by the team. At least not for now.

For now, there will be just 4 cmdlets with quite auxiliary tasks:

  • Run-Sqlcmd
  • Decode-SqlName
  • Encode-SqlName
  • Convert-UrnToPath

I hope that post 2008 RTM, SQL team will revise their PowerShell design and make it fit better into PowerShell principles and provide better ways of managing SQL databases and accessing the data. Until then, the use will probably be limited to just browsing the databases, and for most tasks .NET classes being called from PowerShell syntax (like in this pack from PowerGUI library).

Tags: ,

SDM Software provides 12 GPO cmdlets

Managing GPOs via PowerShell has always been a natural and significant next step after AD management, and it is great to see the ecosystem around PowerShell advancing in closing the gaps. SDM Software guys have updated their free PowerShell snapin which now includes cmdlets to create, change, link, export, import, remove GPOs, as well as manage their security.

This is great, and I like to think I was a bit partial to that, because I was telling Darren about the idea back in March 2007. Of course I am pretty sure I was not the only one, but it’s nice to think you were a part of something great, right? ;)

UPDATE: It turned out that while I was writing this, SDM Software extended the pack from 9 to 12 cmdlets so you can now also get and remove GPO links, as well as work with GPO backups. You guys are quick!

Tags: ,

MCS Ireland using PowerGUI

Looks like Microsoft Consulting Services in Ireland started using PowerGUI for Exchange 2007 management. Check this out: Exchange 2007 Powershell Answer –The PowerGUI

Tags: , , , ,

Next Page »