Create your own org chart from AD with PowerGUI!

Another week has gone by and I have another brand new PowerPack ready for download.  This time around it’s the Org Chart PowerPack.  This is a PowerPack that I put together based on a Get-OrgChart function I wrote to analyze org chart data at work.  It lets you do some really cool things such as:

  1. Dynamically create an org chart from users in Active Directory using title, department, office, address, and other properties.
  2. Generate a Visio Org Chart from PowerGUI for the any branch of an organization.
  3. Create statistical reports for the employees in your organization to see breakdowns of employees by office, department, management, etc.
  4. Dynamically generate Office Directory reports in HTML when using it in conjunction with the Advanced Reporting PowerPack.

Note: The Org Chart PowerPack uses the Quest AD cmdlets to retrieve information from AD so you will need to install those first before you can use the PowerPack.

If you would like to see how this PowerPack can be of benefit to you, check out this screencast:

This screencast was recorded in HD format so you can click on the HD button once you start watching it to enable high definition video.  Alternatively, if you would prefer to watch a high resolution flash version with a table of contents you can watch the screencast here.  I decided to try widescreen format this time since that is my format preference…let me know if this is a problem for you.

This is the first release of this PowerPack and I’m anxious to hear what you think so please give it a look and share your feedback so that I can improve it with another update in the future.

Thanks for listening!

Kirk out.

Share this post:

Just Released: Advanced Reporting PowerPack

I just published a brand new PowerPack to the PowerPack Library called the Advanced Reporting PowerPack.  If you’ve been keeping your eyes on the Virtualization EcoShell project as well as PowerGUI, you may have already come across this PowerPack because I released it there first.

The Advanced Reporting PowerPack allows you to generate HTML reports with collapsible nested groups for any set of data in PowerGUI.  Think VMs, Snapshots, AD Users or Groups…you name it.  If you can get the data into a grid in PowerGUI, you can generate a nice HTML report using this PowerPack.  The only UI element this PowerPack adds to PowerGUI is a common action called “Create report…”.  This action does all of the heavy lifting to generate a cool HTML report for the items you have selected.

Want to see what how to get started using this PowerPack?  Watch this screencast:

If you would prefer to watch a higher resolution version, you can watch the screencast in flash format here.

This is only the first release of advanced reporting functionality in PowerGUI and already it’s really powerful.  Still, there is room for improvement so if you have any feedback, please share it with me in my comments or on the PowerGUI Forums so that I can consider it for the next release!

Thanks and enjoy!

Kirk out.

Share this post:

Create custom nodes easily with the Active Directory PowerPack and PowerGUI

Here’s a great question that someone just posted today on the PowerGUI forums:

I have the latest verions of the Quest AD cmdlets, PowerGUI and the Active Directory PowerPack.  Can I use PowerGUI to search for old computer accounts?  For example: computer accounts that haven’t had their machine account password reset for over three months?

The timing of this question is perfect because the update of the Active Directory PowerPack that I posted two weeks ago allows you to do this without having to write any scripts yourself.  For those of you who want to try this but don’t have the most recent versions of PowerGUI, the Quest AD cmdlets and the Active Directory PowerPack installed, follow those links and download and install those before continuing.  Installation instructions are on the appropriate web pages where necessary.

Once you all of the necessary software installed, here’s what you need to do.

Step 1: Add the attributes you need to the list of attributes retrieved from Active Directory.

There are In the PowerGUI Admin Console, expand the “Active Directory” node and click on “Configuration”.  This will show you the current domain that PowerGUI will gather data from.  You can change this if you like, however you don’t need to unless you want to use alternate credentials or connect to another domain.  With the configuration showing in the grid, click on the “Manage default attributes” link.  That will present you with a view something like this:

image

This shows you the current list of attributes that are retrieved for each individual Active Directory object.  This will be initially configured with the default attributes as defined by the Quest AD cmdlets plus a few attributes that are required for the Active Directory PowerPack.  You can add whatever attributes you want to gather here for any of the object types.  To help solve our immediate problem and be able to get a list of computer accounts that have not had their machine account password reset for over three months, we need to add the pwdLastSet attribute for computer objects.  To do this, simply click on the “Add attribute…” action, provide the name of the pwdLastSet attribute in the “Attribute name” field and set the “Retrieve attribute for computer objects” value to True.  When you click on OK, that attribute configuration will be saved and any computer objects retrieved using the Quest AD cmdlets will have that attribute retrieved with them.

Step 2: Retrieve the objects you want from Active Directory and optionally show the attributes you want to filter on.

Once you have configured PowerGUI so that it will retrieve the pwdLastSet attribute for computer objects, you need to get your computers.  You can do this by simply clicking on the “Computers” child node under the “Active Directory” node.  This will present you with a list of computer accounts, showing their Name, Type and DN by default.

With the list of computer objects showing, you can optionally add the pwdLastSet attribute to the view by right-clicking in the column headers and selecting “More…” from the menu that appears.  With the list of all attributes that can be added showing, scroll down until you find the pwdLastSet attribute and check the checkbox beside it.  Then click on OK to save that change and your pwdLastSet attribute will be retrieved with your computer objects from the Computers node.

Step 3: Create a client-side filter to filter out the objects you don’t care about.

With the list of all of your computer objects showing, you can create a filter to reduce the number of objects to those that you need to see.  To do this, click on the Filters button above the column headers.  This will make the filter panel visible.

image

You can use this panel to filter any collection based on the properties of the objects in that collection.  For our particular problem, we want to see computer objects whose password has not been changed in the last 3 months.  We can get that by selecting “pwdLastSet” in the “Property” field, “Less or equal” in the “Operator” field, and selecting the calendar date three months ago in the “Value” field using the calendar control.  Once that is set, click on the “Apply” button to apply the filter and your list of computer objects will be filtered to only show those whose machine passwords haven’t changed in the last 3 months.

Step 4: Make the newly filtered data set available in its own node.

Now that you have the data you’re looking after, your “Computers” node is now configured to always show you the filtered list because PowerGUI remembers the filters you apply to nodes.  You might not like this configuration, preferring to have a separate node to view the data that you want.  Fortunately, PowerGUI lets you do create that easily too, and you still don’t have to do any scripting.  To create a separate node that lets you get the same data set, simply click on the “Save As…” button in the filter panel.  This will allow you to save the script from the Computers node with the filter you have created automatically applied as a client-side filter for that script.  Simply give the new script node a name (something intuitive like “Computers with old passwords” will do), and click on OK to save the new child node.  Then you can click on the “Clear All” button in the filter panel for your “Computers” node because that filter will no longer be needed.  Now click on your new node and you’ll get the list of computers you are after, and it will look something like the screenshot below.

image

Step 5: Make your work reusable at any time by taking it one step further.

At this point you have successfully created a new node that gets specifically the data you were looking for and you didn’t have to do any scripting to get it, which is great!  You can make it a little better still though.  For our specific problem that we’re trying to solve, we created a new node that reports any computer object with a machine account password that hasn’t been changed within 3 months from today.  But tomorrow that will be come 3 months and 1 day.  The next day that will become 3 months and 2 days.  What if you want to customize the node so that it reports computers whose machine accounts have not had their passwords changed in the last 3 months, no matter what day you click on it?  For that to work you will have to do a minor script modification.

Right-click on your new “Computers with old passwords” node and select properties.  This will show you the script used to retrieve your computers and filter the list.  At the very end of that script, you will see something like the following:

func_Computers | Where-Object {
    $_.'pwdlastset' -le [System.DateTime]"2009-02-08"
}

The Where-Object cmdlet contains the filter that is excluding any computers whose pwdLastSet attribute is greater than 3 months from the day we did this (for me that that’s February 8, 2009 since I created the node on May 8, 2009).  To change that filter so that it always works using a date 3 months earlier than now, you simply need to replace [System.DateTime]”2009-02-08” with (Get-Date).AddMonths(-3).  That changes the end of our script to this:

func_Computers | Where-Object {
    $_.'pwdlastset' -le (Get-Date).AddMonths(-3)
}

That’s it!  A simple replacement of the filter condition and you’re off and running with a brand new node designed to meet your specific needs with PowerGUI, the Quest AD cmdlets and the Active Directory PowerPack!

In a future article I’ll show you just how simple it is for you to take a collection of extensions to PowerPacks that you have created like this and package them up in a PowerPack so that you can share them with other users in the Community as well!

Enjoy!

Kirk out.

 

Share this post:

Virtualization EcoShell and the VMware Infrastructure PowerPack

Wow, have I been busy.  In case you hadn’t noticed from my blog posts late last year and early this year, I’ve been working very hard at putting together multiple back-to-back updates for the VMware Infrastructure Management PowerPack for the past several months.  This has involved working long hours with many thousands of lines of PowerShell script and figuring out how to do some really cool things with both PowerShell and VMware’s PowerCLI (formerly known as the VI Toolkit).  The end result is always fulfulling, and I’m usually pretty good at setting up the really cool functionality so that I can leverage it in any PowerPack so all my hard work pays off in the long run.

A few weeks ago I finished off yet another update with some really cool new features, however this update isn’t available for the PowerGUI admin console just yet.  That update is coming shortly after we release the next version of PowerGUI, which has some functionality that it is dependent on.  If you can’t wait until then though, you can take a look at the new functionality now as part of the first public beta release of the Virtualization EcoShell that came out on April 15th.

What is the Virtualization EcoShell?  The Virtualization EcoShell is a project started by Scott Herold that was designed to provide an administrative experience that is tailored for virtualization administrators.  It is powered by PowerGUI and comes with a script editor and an admin console just like PowerGUI.  The out of the box experience is different though because it doesn’t come with PowerPacks for Exchange and Active Directory.  Instead it includes functionality that virtualization administrators care most about.  At the moment this is simply the VMware Infrastructure Management PowerPack, but over time this will grow to include other virtualization-related administrative functionality (think: additional VMware features, functionality to work with virtualization platforms from other vendors, and capabilities to extend into important technologies surrounding virtualization such as storage).

If you want a preview of the next generation of the VMware Infrastructure Management PowerPack a little early as well as a look at a new virtualization administration platform, all you have to do is pop over to the Virtualization EcoShell site and download it.  You can install and use it side-by-side with PowerGUI, so you won’t need any secondary systems or a VM to run it on either.  Once you’ve taken a look, let us know what you think or what you would like to see next on the forums!  Your feedback directly influences the features we add, and we’re listening!

Kirk out.

Share this post:

VMware Infrastructure PowerPack 2.1.5 released

The PowerGUI VMware Infrastructure Management PowerPack seems to be really popular with people, so I’ve been spending a lot of time over the past four months significantly enhancing that PowerPack.  Some of the enhancements are things that we wanted to put in and others are things that community members had requested (note to the reader: if you like a particular PowerPack and would like to see it improved, speak up on the PowerGUI Forums…we really take your feedback very seriously! :)).  Today I just finished posting another release of the VMware Infrastructure Management PowerPack with a few more enhancements, and I’m particularly happy with this one.

This release greatly improves usability through the new icons that were added (and I mean *greatly* improves…the value the icons add is huge).  It’s also the first PowerPack release that takes advantage of some really cool Visio scripts that I’ve been working on.  The Visio scripts I’m referring to were largely inspired by Alan Renouf’s vDiagram script, although the Visio script I ended up with doesn’t look anything like the original.  I’m itching to talk more about those scripts, but I want to write a blog post specifically on that topic so watch for more on this soon.  For now I’ll simply point out that to use the Visio functionality, you have to download the additional VESI_Visio.zip file that was added to the VMware Infrastructure Management PowerPack document page and install it as per the instructions in that document (see the “How to enable vDiagram support” section).  Visio 2007 is required.

For those of you who were fortunate enough to attend VMworld Europe in Cannes at the end of February, this release contains the icons and Visio features that Scott Herold was showing off during that show.  You can see a live demo of the new features on Scott’s website, here.

If you want to learn more about this PowerPack, including version history and other details, you can go here.  You can download the PowerPack from that location as well.

Kirk out.

Share this post:

VMware Infrastructure PowerPack 2.1 released

Hot on the heels of the new release of the VMware VI Toolkit, I just finished uploading version 2.1 of the VMware Infrastructure Management PowerPack for PowerGUI.  This PowerPack facilitates management and automation of VMware Infrastructure servers using the VMware VI Toolkit with PowerGUI’s extendable administrative console.

Version 2.1 of the VMware Infrastructure Management PowerPack includes the following highlights:

  • Significant performance improvements when loading datacenters and clusters.
  • New top-level container nodes to facilitate viewing objects without having to browse into the Managed Hosts node.
  • Links allowing you to browse into log files from hosts.
  • Support for the VMware VI Toolkit 1.5 release.
  • VMotion support for virtual machines.

In addition to these changes, several links have been added and quite a few defects have been fixed.

You can learn more about this PowerPack, including version history and other details here.  You can download it from that location as well.

As always, feedback on this PowerPack and all others is welcome and appreciated.  If you want to see something in the PowerPack, just ask!  You can either contact me directly (see my about page), or you can post your request using the PowerGUI forums.  We’re listening!

Kirk out.

Share this post:

VMware Infrastructure PowerPack 2.0 is now available

Were you  curious what was hiding inside that gold box in theimage  PowerGUI train?  Keeping with the spirit of giving, I just finished publishing version 2.0 of the VMware Infrastructure Management PowerPack.  A lot of effort went into this PowerPack, which ended up including a complete restructuring of the elements in the tree, as well as the addition of a lot of new functionality that was not available in previous versions, all for free just like the many other PowerPacks that are available for PowerGUI.

A few highlights in this version include:

  • Easy management of multiple VMware Virtual Center, ESX, ESXi or Virtual Server hosts from within one console.
  • Single sign-on to multiple hosts that use the same credentials.
  • Support for browsing through any of the inventory hierarchical views that are available in Virtual Center.
  • Management of virtualization elements within one host or across many hosts through the same set of links and actions.
  • Reporting and management of sessions, datacenters, clusters, resource pools, hosts, folders, virtual machines, templates, snapshots, networks, datastores, files, tasks and log files.

You can learn more about this PowerPack, including version history and other details here.  You can download it from that location as well.

Still not convinced you should give the VMware Infrastructure Management PowerPack a look?  Below you can click on a few screenshots to get a taste of what you’ll find if you do.

Browsing the Virtual Center hierarchy while managing snapshot files

Managing host sessions

Managing virtual machines

Looking into log files

If you manage VMware hosts or if you are interested in writing scripts against VMware hosts using PowerShell, I strongly encourage you to give this PowerPack a look.

As always, feedback on this PowerPack and all others is welcome and appreciated.  If you want to see something in the PowerPack, just ask!  You can either contact me directly (see my about page), or you can post your request using the PowerGUI forums.  We’re listening!

Happy Holidays everyone!

Kirk out.

Share this post:

Why isn’t my PowerPack showing up in PowerGUI?

Here’s an interesting question that came up recently:

“I just installed PowerGUI with the Exchange PowerPack and then I installed the Exchange 2007 Management Console.  The Exchange folder isn’t showing up in the PowerGUI Console.  Can you help?”

Yes, I can help.  Actually I came across this very same scenario myself not too long ago when working with a new VM.

If you install PowerGUI today, you can let it pick which of the core PowerPacks to install.  By default, PowerGUI will pick the PowerPacks for which you have the required PowerShell snapin(s) already installed.  For example, this means that the Exchange 2007 PowerPack will be installed automatically if you have the Exchange Management Console installed on your local machine, and the Active Directory PowerPack will be installed automatically if you have the Quest AD Cmdlets installed on your local machine.

Alternatively, you can also pick which PowerPacks you want to install yourself whether you have the required snapin(s) or not by using the custom install option.  I usually take this approach when I install PowerGUI, picking all PowerPacks so that I get all of the functionality that it comes with.  Most of the time this works fine when I have already installed all of the snapins I need, but what happens if you are missing one or more of the required snapins?  When you open PowerGUI for the first time your PowerGUI tree will automatically load all of the PowerPacks you installed for which you have the required snapins.  If you installed PowerPacks for which you don’t have the required snapins, they won’t show up in the PowerGUI tree.

Sounds like an easy enough problem to solve, right?  You can just install the missing snapin and then come back into PowerGUI and…um…notice that the PowerPack isn’t there.  This is because the automatic loading of the PowerGUI tree is only done once (at the moment; this will likely change in the future).  If you don’t have the required snapin installed when that happens, the PowerPack doesn’t get loaded into the PowerGUI tree.  Here lies the problem for the individual who asked the question stated earlier.

Fortunately the solution is straightforward once you know where the missing PowerPack is stored.  When PowerGUI is installed, all PowerPacks that are installed with it are placed in the PowerPacks subfolder of the PowerGUI installation folder.  To load a PowerPack that is missing because the prerequisite snapin wasn’t installed earlier, all you need to do is select File | PowerPack Management, click Import, browse to that folder and select the PowerPack that you want to import.  Once PowerGUI has verified that you have the required snapin(s) for that PowerPack installed it will import the PowerPack and your missing folder will be available in the PowerGUI tree.  And in case you weren’t aware, this is also the same way you would extend PowerGUI with other PowerPacks that you download from the library…download the PowerPack file, right-click the root node, select Import, and then select the PowerPack file you downloaded.

Hopefully this will help as you start using more snapins to manage and automate more with PowerShell and PowerGUI.

Kirk out.

Share this post:

Enter the PowerPack Challenge!

Ok, I’m really excited about this one.  Quest Software (my employer and sponsor of all PowerGUI development) has created a PowerGUI contest!  Whether you are a newcomer to PowerShell, a seasoned PowerShell scripter or somewhere in between, why not experiment with all of the creative things you can do with PowerGUI and PowerShell and enter the PowerPack Challenge!  All you need to do to enter is create and/or update one or more PowerPacks during the contest period (between July 1, 2008 and September 30, 2008).  There are some great prizes to be won, as described on the PowerPack Challenge contest page!

So now that you know about the contest, what should you do next?  Since the contest period doesn’t start until July 1, 2008, you have some time to prepare yourself for the contest.  if you aren’t totally familiar with PowerPacks or how to create them, you can learn how to do that by watching the flash demo I created here.  If you want to browse existing PowerPacks to get an idea what is already available, you can look in the PowerPack library here.  Or if you are attending the IT Pro week of TechEd 2008, there are a lot of sessions, hands on labs, instructor led labs, and more with PowerShell content and you can learn more about PowerShell and PowerGUI by visiting the demo station in booth 1101.

And please, just like anything else I post on this blog, if you have questions don’t hesitate to ask.

Thanks and good luck with your contest entries!

Kirk out.

Share this post:

Use PowerGUI to manage SQL Server 2008

SQL Server 2008 marks the first release for SQL Server that includes PowerShell support.  This is just the beginning of a trend for all Microsoft Server products now that PowerShell is part of their Common Engineering Criteria beginning in fiscal year 2009.  I just spent the past week or so experimenting with PowerShell and SQL Server, first using SMO directly and then using the snapins that are part of SQL Server 2008.

I’m still testing the waters in many places but so far I’m pretty happy with the PowerShell support in SQL Server 2008.  Back when they first announced support, it didn’t sound all that impressive but now that I’ve dug in and started using it myself I’ve found that it is much more than I thought it would be.  SQL Server 2008 is still in CTP, so there are still bugs and still changes coming, but overall this looks like a nice addition to PowerShell, and one that should get even better through service packs as time goes on.

While working with the SQL provider and cmdlets I put together my first-attempt at a SQL Server PowerPack for PowerGUI.  This PowerPack is pretty lightweight at this point, allowing you to browse through the SQL Server instances you have, add connections to other servers, open tables and views and view their contents, as well as a few other miscellaneous things.  It requires the SQL Server 2008 client tools, however it seems to work fine with SQL Server 2005 (and presumably SQL Server 2000 since it uses SMO and WMI under the covers) once you have the SQL Server 2008 client tools installed.  You can download the PowerPack here.

Over the next little while I will be continuing to enhance this PowerPack, so if you work with SQL Server and PowerShell and have any feedback or enhancement requests for this PowerPack, please let me know through comments, email (see my about page), or the PowerGUI forums.

Thanks,

Kirk out.

Share this post :