Archive for May, 2007

ForEach, ForEach and ForEach-Object

No, that is not a typo. ForEach is a statement for stepping through a collection of objects, in the receiving end of a pipeline of objects output from an operation or cmdlet as well as an alias to ForEach-Object cmdlet in PowerShell:

PS C:\> get-alias foreach

CommandType Name Definition
———– —- ———-
Alias foreach ForEach-Object

If you attempt to use just ForEach on the PowerShell command line like …

PS C:\> foreach ($var in $varcoln) {
>> $var
>> }
>>

PS C:\> get-service | foreach { write-host $_.Name “( Status:” $_.Status “)” }
>>
>>

… the built-in ForEach statement will take precedence over the same ForEach alias. This is confirmed when you try to explicitly use ForEach-Object which is invalid (hence the error message);

PS C:\> foreach-object ($var in $varcoln) { $var }
Unexpected token ‘in’ in expression or statement.
At line:1 char:22
+ foreach-object ($var in <<<< $varcoln) { $var }

This is expected as the correct syntax for the ForEach-Object is different; see man ForEach-Object.

No Comments »

PowerTab 0.92

For those low on budget for a full-fledged IDE for your PowerShell development (such as Intellisense and other cool productivity features), take a look at PowerTab by MoW aka The PowerShell Guy. Any avid PowerShell fan should bookmark this blog if you want to keep up with his amazing and creative use of PowerShell.

No Comments »

Update: Windows Server Virtualization Calculator 2.0

Last report here in January 2007, the Windows Server Virtualization Calculator has been updated and made available as a free online tool here. There are now 2 versions available - Calculator 1 and 2. Essentially, they are still useful only for the purpose of calculating the number of Windows server licenses needed to support the VM configuration punched in by the user e.g. virtualization technology, sockets and clustering requirements.

Interestingly enough, virtualization technology does not only cover Microsoft’s own virtualization products but also 3rd party platforms such as VMware.

No Comments »

Updated PowerShell Book

Frank Koch, platform technology adviser from Microsoft Switzerland, has published an updated version of his PowerShell Handbook in German. You are invited to submit any ideas and feedback to him; the more input he gets, the better the chance he will (have to) find time to keep revising the handbook with new materials. You can send him your feedback and download the handbook using the link here

No Comments »

Update: Introducing Exchange Server 2007 @ Techiesonly (Dubai)

It was a great session that started promptly at 1630 hrs with a fairly good attendee turnout. The event was sponsored by Microsoft Dubai at their office in Dubai Internet City on 27th May 2007 evening. The UAE IT Pro User Group leader (techiesonly.com), Adnan, welcomed the attendees and gave an introduction to the user group, its mission statement and past achievements. This was followed by a short welcome speech by Saba Corm (IW Business Group Manager Microsoft Gulf) and Sandra Skairjeh (Audience Marketing Manager).

As scheduled, I delivered the level 200++ technical presentation covering topics such as Unified Communications, Exchange in today’s business, upgrade / migrate / transition strategy and scenarios, security, and the new Exchange server roles, just to name a few. The crowd was very enthusiastic and highly interactive, posing several really excellent questions from the floor (nobody fell asleep by the way :-).

My favorite topic on PowerShell (well, Exchange Management Console) was the most well received as many of the attendees saw first hand / eye of the power in the (Power)shell. The saying ‘Seeing is Believing’ cannot be any more true than that! Unfortunately, the projector did not like the resolution for the dual-screen mode and I had to look at the screen from the attendee’s perspective in order to run the EMC demo (despite tech checks conducted in advance of the session)! Now I had a bit of a bad neck and shoulder ache but hope to get over with it soon.

All except one of the attendees who came stayed through the entire session, even though it overran by about 1 hour (to 1930 hrs UTC + 4) because they just had not enough of the good stuff! At the end, a few lucky attendees walked away with fabulous prizes sponsored kindly by both Microsoft Dubai and UAE IT Pro User Group.

And the event feedback forms (plus many more received after event email comments) … full of encouragement, requests for more (such events), ideas and wonderfully great evaluation scores (many many thanks to you ^-^). This will certainly help us plan for better and bigger events that means the most for IT Pros, by IT Pros for IT Pros (side note: why not volunteer as a speaker or help out your fellow IT Pro peers as part of the local user group?).

For more information and gallery on the event, visit techiesonly.com here and here.

No Comments »

Event: Unified Communications @ Microsoft Schweiz

Mark this date - Thu 14 Jun 2007 (from 1300 hrs) at Microsoft Switzerland - for another peak into the strategic Unified Communications horizon. Explore the possibilities to simplify and reduce costs at this event with a practical look at VoIP, ePhone, Exchange Server 2007 and Office Communications Server 2007.

Event is delivered in German. More information available here.

No Comments »

PowerShell Interactive @ Swiss IT Pro User Group Event (Zurich & Geneva)

I shall be (co)presenting Swiss IT Pro User Group’s monthly event back in Switzerland with Marcel Truempy (Microsoft Schweiz) - Windows PowerShell SPECIAL with hands-on! There will be 2 similar evening events (from 1745 hrs) - Tue 5 Jun 2007 in Zürich and Thu 7 Jun 2007 in Genève. Experience first hand the power of object-orientated programming at this special Swiss IT Pro User Group event with no pre-requisites necessary.

More information and registration here. This free event is brought to you by IT Pros for IT Pros and supported by Microsoft Switzerland.

No Comments »

PowerShell in Microsoft Products (Present & Future) #2

One other product which a typical organization may not deploy is the Microsoft Compute Cluster. Only recently the Compute Cluster group team’s blog announced that a PowerShell Snap-in now comes with a provider and a set of commands. This is part of the Microsoft Compute Cluster Pack Tool Pack which is a collection of utilities being provided ‘as is’ and without official support . Read more about it here and here.

1 Comment »

PowerShell in Microsoft Products (Present & Future)

There does not appear to be any authoritative list on the inclusion of Windows PowerShell support from the source so I thought I should do a quick summary of it here. This includes current and future Microsoft products assembled from various public sources available to date.

- Windows Server 2003 SP1
- Windows Vista RTM
- Windows XP SP2
- Exchange Server 2007 (first with full built-in PowerShell support?)
- Windows Server 2008, IIS 7, etc. (aka Longhorn)
- System Center Virtual Machine Manager 2007
- System Center Operations Manager 2007 / Configuration Manager 2007

Additionally, the following products have been shown to work with PowerShell by way of retrofitting for example:

- Virtual Server 2005 R2
- SharePoint Server 2007
- Exchange Server 2003

In fact, it appears that any supported Windows platform with .NET Framework 2.0 should work well with PowerShell.

Did I miss out any that should be included? Let me know by leaving your comments here. Thanks!

1 Comment »

Windows Locked Login Fields

There may be occasions where an administrator used RDP to connect to a remote Windows Server 2003 and returned to find the following:

Windows Server RDP Windows Locked Login Fields

One workaround is to open up another RDP session and disconnect that session using Terminal Services Manager. This behavior could be caused by group policy settings restricting the time allowed online or idle time.

No Comments »

Next »