Archive for May, 2007

TechEd 2007: PowerShell Sessions

Next week I will be co-presenting at a few sessions at TechEd 2007 in Orlando, Florida. Most of the sessions will be presented by Don Jones – the author of Microsoft Windows PowerShell: TFM. I will be jumping in with AD cmdlets and PowerGUI.

Here’s the session information – please stop by if you are attending:

SVR331 – Tuesday 5JUN07 and Wednesday 6JUN07
Microsoft Windows PowerShell: The Future of Server Administration
Track(s): Windows Server Infrastructure
Level: 300
Speaker(s): Don Jones and Dmitry Sotnikov

Windows PowerShell is Microsoft’s next generation command line scripting solution which combines the interactivity of KSH or BASH, the programmability of Perl or Ruby and the production-orientation of AS400 CL or VMS DCL. Come and learn about the basic capabilities of Windows PowerShell as an interactive shell environment and a rich scripting engine and how it can be used to highlight and exploit the manageability improvements in Windows Server codename “Longhorn.”

Note that for this one, most likely I won’t be able to participate in the Tuesday session but will jump in on the Wednesday repeat. This is because the Tuesday session will be webcasted live from Don’s machine and it might not be technically feasible to add another speaker with a different demo.

Chalk talk: Windows Server Infrastructure (Thursday 7JUN07)
Level: 300
Speaker(s): Don Jones and Dmitry Sotnikov

This session provides a deep drill into advanced Windows PowerShell scripting techniques. Windows PowerShell provides an incredibly large dynamic range of capabilities, from simple to very sophisticated. This session is for those who have mastered the simple range and want to explore the high-end techniques and mechanisms.

See you at TechEd!

Tags: , , , , , , , , ,


Extend AD cmdlets’ reach

AD cmdlets project is moving along with new features being added all the time but what if what you get now (and the current version is 1.0.2) does not give you what you want yet?

Similar to how we used QADObject to manage OUs in the absence of QADOrganizationalUnit cmdlets you can get access to individual attributes as well.

Checkout this thread at to see how you can retrieve the attributes not  yet exposed in cmdlets. For example, to get the LastName attribute missing in 1.0.2 you can use the following command:

Get-QADUser | select Name, FirstName, @{Name=”Last Name”; Expression={$}}

Vote for the next PowerGUI feature

We’ve added voting for the features we are considering for our next release: PowerGUI 1.0.8+ feature poll. (Yes, we finally seem to be running out of issues to fix ;))

The features we are considering include:

  • Making the PowerShell Code we generate more readable.
  • Automatically determining the class of WMI objects when WMI is used to display appropriate links and actions.
  • Further improve performance (1.0.6 is much better than 1.0 was but there’s still space for that.)
  • Let scripted links modify PowerGUI UI: for example, the label in the Path control above the grid. This could be used for nicer Public Folder or OU browsing experience.
  • Make PowerGUI check for System Requirements for PowerPacks (e.g. when you try to import the Exchange pack lat you know that Exchange 2007 management tools are required).
  • “Smart controls” for parameters: e.g. drop-downs for enumerations, True/False drop-down for boolean, Date/Time control for dates, etc.
  • Better script text editor for adding scripted nodes and action: highlighting, intellisense, etc.

Please go to and vote for the feature you want us to do first!

Manage Local Users and Groups with PowerShell

We’ve been blogging so much about using PowerShell to manage AD users and groups so it’s probably the right time now to check-out PowerShell usage to do the same for local Windows (workstation or server) accounts management.

Luckily, learning that is very straight-forward.

Rob “Deuce” Doucette published a PowerPack for Local Users And Groups management with PowerShell to the PowerGUI library.

Quoting from his description:

This pack allows you to enumerate local users and groups as well as execute some actions against users. Along with the local users, you’ll be able to see the last login time, password age, and the number of bad password attempts. As well, you’ll be able to:

  • view the password/account policies for users -change a users password
  • force a user to change their password next time they login
  • add/remove users to a group
  • enable/disable users

As usual with PowerGUI, all these actions generate PowerShell code on the “PowerShell Code” tab so once you’ve done all that in UI, click the tab and copy-paste the code into your scripts or command prompt.

This should work for Windows XP, 2003, Vista and 2008 (aka Longhorn.)

To use the pack:

  1. download and install PowerGUI,
  2. download the localuserandgroups.snapin file attached to the library post, and
  3. import the file into the PowerGUI tree.

Tags: , , , , , , ,

PowerShell for Self-Service

Just found an interesting example of PowerShell reducing the number of helpdesk calls (at least from me).

Our office IT sent out an email to everyone in my office telling that the appropriate procedure to get personal details (such as phone numbers) updated in the GAL is by sending email to the helpdesk alias.

I asked them whether this was because AD was not authoritative. It turned out that for this information it is indeed authoritative so what they do once they get an email request is actually changing the attributes in Active Directory.

My reply of course was that in this case I didn’t need the helpdesk and PowerShell did the job for me just fine.

Here’s the screenshot which I attached to the email:

Self-service with PowerShell

This of course is possible because PowerShell is not just for admins!

Tags: , , , , , , , ,

Track PowerGUI library popularity

We keep improving the community site and its library. Library is important because this is where the real community is and where community members exchange the great PowerPacks they create.

After adding categories for easier navigation a couple of weeks ago we have now added tracking for number of downloads. Now for each item posted to the library you can see the number of times it got downloaded:

PowerGUI Library downloads counter

This is another great way of getting the feedback (together with the rating and comments we had before).

Tags: , , ,

Integrated PowerShell Help Tool

Kirk has posted a fascinating PowerPack to the library – Integrated PowerShell Help (click the picture to enlarge it):

Integrated PowerShell Help - PowerPack for PowerGUI

Basicall, it give you GUI console to slice and dice the help system – both from the native cmdlets and whatever 3rd-party snapins you got installed. You can sort, use filter for search, or just browse around to see what’s there.

Links and Actions let you open full articles, examples, and syntax descriptions, explore various dependencies and related items. Very handy!

It shows you various groupings as well. So you can see, for example, that in the native set the most popular verb is Get- (29 of those) and the most popular nouns are -Item and -Object (9 cmdlets each).

Looks like a very handy tool for studying and using PowerShell!

Tags: , , ,

Demo: Advanced Exchange 2007 Management

PowerGUI documentation section got updated with a new demo – Advanced Exchange 2007 Management.

Although PowerGUI introductory demo indeed used Exchange 2007 it mostly had basic mailbox and Exchange management.

However, there are tasks for which Exchange 2007 Management Console at the moment does not provide any user interface and in this demo we concentrated on some of them, namely:

  • Mailbox provisioning from CSV files, and using existing mailboxes as a model,
  • Managing Public Folders (browse, create, mail-enable and so on),
  • Manage certificates, request and generate new x.509 Transport Security certificates.

This all makes PowerGUI really handy when managing Exchange 2007 deployments, and learning PowerShell for automating such tasks.

Are there any other tasks that native UI does not cover at the moment? Leave your comments or participate in PowerGUI Discussion Forums.

Tags: , , , , , , ,

AD Cmdlets 1.0.2 Released: Support Vista and Longhorn

Andrei posted an announcement on release of v1.0.2 of AD cmdlets.

Vista/Longhorn Support

To me this is the main new feature. Not any particular cmdlet but just the ability to install and run the cmdlets on Windows Vista and Windows Server 2008 (Longhorn). My desktop computer runs Vista and my demo lab is 2008 so I am glad I no longer need to use a dev build not being available publicly.

However, besides that there are multiple other improvements such as:

Remove-QADObject cmdlet

Supports pipelining so you could run something like:

Get-QADGroupMember *Managers | Remove-QADObject -whatif

to get read of all managers in your company.

Seriously though, please execise with caution. Deleting accounts, groups, OUs, etc. can be pretty dangerous. Always use -whatif before really running the command, and when you do run it, carefully read the “Are you sure” note before confirming.

There is also the-DeleteTree parameter for objects within OUs:

Remove-QADObject '' -DeleteTree

Obviously, there are multiple other parameters (such as -Force) which you can find in documentation, help, or just by using tab-completion.

Output limits

1.0.1 had a couple of get- limitations:

All get- cmdlets returned by default just the first 1000 objects and if you wanted more (e.g. all) you had to use the -SizeLimit parameter with some huge number. In 1.0.2 the default limitation is still there(which is great in large environments) but unlimited mode is implemented. To remove the limitation simply use zero as your size limit.

(Get-QADUser -SizeLimit 0).Count

should return you the number of user accounts in your AD even if you have more than a 1,000 of those.

Get-GroupMember is also now not limited to the AD default retrieve set (was that 1,000 as well?) and always returns full list of members. You don’t have to use any parameters to achieve that:

Get-GroupMember "World-Wide Everyone"

will give you a list of all accounts in the group no matter how big it is.

You can create enabled user accounts

1.0.1 did not support setting UserAccountControl flags during creation so you had to first create an account and then use Set-QADUser to enable it. Now you can do it all with one cmdlet:

New-QADUser -Name 'User1' -OU '' -UserPassword 'Qwerty123' -ObjectAttributes @{userAccountControl=512}

Smart wildcard mode

Before that you had to manually switch cmdlets to PowerShell-wildcard mode for advanced wildcards. With 1.0.2 cmdlets are smart enough to make the decision for you:

Everything that was there before

All the functionality they had in 1.0.1 is of course still there as well.

Tags: , , , , , , , , ,

PowerGUI 1.0.6 released!

We have just made PowerGUI 1.0.6 available for download from

As I mentioned before, stability was a priority for this release, so there are no radical changes apart from multiple bugfixes and minor improvements.

Setup should stop giving weird messages on Vista and Longhorn, filters work correctly even when 0 objects are displayed, PowerShell snapins don’t disappear and so on. You can read more information on the fixes 1.0.6 has on the PowerGUI Feature Roadmap page.

Also, because of the issues we had with the initial 1.0.5 setup, we are now taking a more staging approach: we put the new version on site couple of days ago and waited for some time before making the announcement in this blog. (As usual, Richard was the first to spot that and report in his blog! I wonder where he finds time for all that?)

No one reported any issues – so I am posting this. However, that’s not the last stage. We will leave it for a few more days in the manual update mode. Only if we get no complaints we will turn on autoupdate for 1.0.5 so all PowerGUI installations connected to the internet prompt user to perform the upgrade.

Tags: , , , ,

My Recent Tweets


The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

May 2007

%d bloggers like this: