Wednesday, December 21, 2011

PowerShell v3 has some great GUI

When you look at a command-line window – all text, a flashing cursor, and no toolbar or ribbon of any kind – you don’t think that it is a “graphical user interface (GUI).”That’s certainly the case with Windows PowerShell v3, which first shipped with the Windows 8 Developer Preview and which is now available as a Community Technology Preview(part of Windows Management Framework 3.0) that installs on Windows 7. But the real beauty of PowerShellis the fact that, under the hood, it’s neither GUI nor command-line interface (CLI). It’s a little bit of both – and v3 proves it.

A little bit of helpPerhaps you’re a bit confused on how to use the Get-WmiObject cmdlet. Asking for Help Get-WmiObject provides the dense information shown in Figure 1 – which might or might not be helpful, depending on whether or not you can uncross your eyes and make sense of it all.

Figure 1: Help Get-WmiObject Help Get-WmiObject

But run Show-Command Get-WmiObject and a new, GUI-based prompt appears. Each parameter set is broken out onto its own tab, and each parameter is broken out onto its own line. Required parameters have a simple "*" next to their names, and switches are displayed as checkboxes. Easy. When you’re done, you can either run the command or copy it to the clipboard, making it easier to paste it somewhere else and incorporate other commands. Figure 2 shows what it looks like.

Figure 2: Show-Command Get-WmiObject Show-Command Get-WmiObject

Fancy outputPowerShell v3 still includes the handy Out-GridView cmdlet (figure 3), which accepts the output from other cmdlets and constructs a GUI-style table. With clickable column headers for sorting, and with the ability to dynamically filter what’s shown using the built-in “Add criteria” button, this grid view will be all the GUI you need for displaying many different types of output.

Figure 3: Out-GridView cmdlet Out-GridView cmdlet

Better editingThe PowerShell team has made its biggest GUI investments in the new PowerShell Integrated Scripting Environment (figure 4). Finally, we’ve got the pop-up “IntelliSense” code-completion and hinting features we’ve always wanted. The system even shows a brief version of a cmdlet’s help, reminding you what it does and how it’s used.

Figure 4: Integrated scripting environment
Integrated scripting environment


A Commands browser on the right-hand side provides a complete list of every command loaded into the shell, and can be filtered to just include the commands from a particular add-in module like Active Directory. Given that the toughest part about a command-line environment is figuring out what commands you have to work with, this new browser should make it a lot easier to discover and use commands.

Welcome to the WebBut wait: there’s still more GUI to be had in v3, and this time it’s of the Web variety. The new PowerShell Web Access interface is an optional feature that’s installed on a server (Internet Information Services is a pre-requisite for this feature). Once configured, you’ll get a complete Web-based command-line window that’s even pretty usable on a small device like an iPhone. Punch commands into a textbox near the bottom of the screen, hit Enter, and the command executes – with the output displayed in a scrollable, CLI-like window that occupies most of the screen.
I imagine that PowerShell Web Access (PWA) will be installed on a “bridgehead” server within the data center. Since it supports multiple simultaneous connections, any number of administrators could use it to remotely access data center resources, run scripts, execute commands, and otherwise get their jobs done. PWA even supports tab completion, helping to complete cmdlet and parameter names as you type – which is especially welcome when you’re trying to hammer out a long one-liner on your Android phone’s tiny keyboard! You even get a command history, just like you were using the normal PowerShell console.

PWA supports all of the usual IIS authentication mechanisms – digest, basic, integrated, and so forth – and can of course be secured by means of an HTTPS connection, so it looks like it could become a really useful, secure means of giving administrators low-level access to the environment.

It’s a CLI! It’s a GUI! It’s a floor wax!Okay, maybe it won’t shine your floors, but PowerShell v3 is certainly starting to break down the traditional model of a command-line shell. With GUI features in just the right places to make the shell easier to learn, v3 continues to offer plenty of power and expanded reach across a number of administration areas.

By Don Jones

Saturday, July 2, 2011

Using Windows 7 Part 1

Windows 7 has had some fine tweaks made to it. There were many complaints about what Vista was and Microsoft heard and delivered. The real question is. Now that you have the features you asked for why are you not using them? An edition of Windows 7 is not just another version of Windows XP or Vista. It is in a category all by itself. Security is my area of expertise but the functionality that Windows 7 brings to the table is not seen implemented hardly or even at all. Company A has migrated from Windows XP Professional to Windows 7 Professional. Their main achievement for the upgrade was to reduce cost and potentially gain a return on investment by increasing user productivity and enabling features like AppLocker and Branch Cache. Also, keeping in mind that these features are only available in the versions of Windows 7 Ultimate and Enterprise.
Bit Locker functionality and Direct Access has been thrown out of the window because of this upgrade path. There is an old saying, “If you do not know where you are going. Any road will take you there.” Now Company A has upgraded to Windows 7 along the wrong path for their needs. Mobile users are present and need software updates as well as any new policy that the company has deployed. So far this is a debacle. Company A is now in the same position as they were before the upgrade. Huge downloadable files are still coming over the WAN, mobile users are not protected as Bit Locker is not enabled, Direct Access cannot be used as it is not supported in Windows 7 Professional (at the time of this article being written).  

Now Company A has to reinvest finances to upgrade to Ultimate or Enterprise. In this case scenario I do not see the Return on Invest. How will this upgrade path support the company within 3-4 years?
These features are the very foundation for moving to Windows 7 in the first place. There is a greater ease in deployment. Better manageability using tools like RSAT federation searches, credential manager, and recovery from a failed system. Even the option to use AppLocker, even though most users hate it has been removed from your list of options.

Well you might say our company has saved on power a little and because Windows 7 does a great job of maintaining itself there are fewer helpdesk cost. Let’s look at the bigger picture. Company A is still spending money over the WAN. Computers are still not protected from known threats. The risk of company data being easily stolen is present with no PKI or Bit Locker encryption. Windows 7 coupled together with Windows Server 2008 R2 is a match made from heaven. Using roles such as AD CS, WSUS, NAP, and DFS. You pretty much have an infrastructure that will let you know when something is broken and wrong before the user gives the Help Desk a call.

You asked for it now you have it. Windows 7 brings to the table what we have been asking for, for a long time. The real question is when will you start taking advantage of this cost saving software? My advice is to follow the six P’s. Prior, Proper, Planning Prevents, Poor, Performance. Take your time and plan out your Windows 7 infrastructure for the future knowing that you can take advantage of using all of the features with one upgrade. Spend money once and your CFO will be a very happy person.

Adnan Cartwright
CEO Integrity Solutions Inc