Archive for the 'Windows Server 2008' Category

PowerShell on Server Core

[UPDATE] Instructions below are for Windows Server 2008 which does not have PowerShell or .NET support for Server Core. Windows Server 2008 R2 released later, has native support for these, so you can simply follow these Microsoft instructions to enable PowerShell there: http://support.microsoft.com/kb/976736

Below is a step-by-step instruction on installing Windows PowerShell on Windows Server 2008 in Server Core mode.

Note that these are in no way official or supported by Microsoft. Microsoft is working on official version of .NET and PowerShell for Server Core installations, so eventually you will be able to get this fully supported. Until then below are the instructions you can use at your own risk, etc., etc.

Quick Introduction

Windows Server 2008 has a command-line installation option – Server Core – which significantly reduces the attack surface and patch requirements by the virtue of not having Explorer and other UI components not needed in datacenter.

The problem is that it only ships with traditional cmd.exe and not PowerShell. To make things worse neither PowerShell nor .NET as they are today can be installed on such systems.

Below are the steps you can take to create packages of these tools which can be installed. Basically the whole procedure consists of just four main steps:

  1. Installing Visual C++ Redistributable Packages (required for .NET).
  2. Installing .NET 2.0 SP1
  3. Installing PowerShell.
  4. Jumping around the computer and shouting “I’ve got it!”

So let’s get started!

1. Visual C++ Redistributable Packages

This is the easiest one. All you need to do is download the packages you need:

After that, copy these files to your Server Core computer (e.g. using Robocopy) and simply run them there.

If your Server Core is 32-bit – just run vcredist_x86.exe.
If it is 64-bit, you need to install both x86 and x64 versions (vcredist_x86.exe and vcredist_x64.exe).

2. .NET Framework

This is the most tricky part. PowerShell needs .NET 2.0 and .NET 2.0 is supposed to be a component of Windows Server 2008 so we will have to get a package of the framework which can get installed on such a system. To accomplish that we will:

  1. Download .NET Framework 3.5.
  2. Unpack the setup to get access to the .NET 2.0 Service Pack 1 installation files.
  3. Download and install the Orca MSI editor.
  4. Use Orca to remove the Windows version check.
  5. Run the updated MSI.

2.1. Download .NET: Go to Microsoft’s web site and download full redistributable package of .NET 3.5.

2.2. Unpack the file:
a. Create a folder c:\deploy
b. Save the downloaded .NET framework package to this folder.
c. Download the wonderful deploy.cmd script which Artem has posted and put it into the same folder.
d. Run the script.

After the script executes, the C:\Deploy\AIP folder will have both NetFx20_x64 and NetFx20_x86 folders with .NET 2.0 framework files you need.

2.3. Install Orca:

This is great but unfortunately you cannot just install the files because the MSIs are specifically checking for Windows version. So now we need to disable this check. To do this we will use Microsoft’s Orca MSI editor.

Note: This all needs to be done on a regular, not Server Core, machine. We will copy the results of our Orca operations to the Core box later on.

If you don’t have Orca, follow these steps to download it:
a. Download the Windows SDK for Windows Server 2008 and .NET Framework 3.5 installer.
b. Run the installer and deselect everything except Win32 Developer Tools (this will make sure that you only download the few megs you need.)

Downloading Orca

c. After the installation completes, go to C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin and install Orca.msi.

2.4. Tweak the setup:

Now its time to do some patching.
a. Start Orca and open the MSI you need (C:\Deploy\AIP\NetFx20_x86\NetFx20a_x86.msi for 32-bit version or C:\Deploy\AIP\NetFx20_x64\NetFx20a_x64.msi for x64).
b. Click Component.
c. In x86 locate: Regtlib.exe_Tool_____X86.3643236F_FC70_11D3_A536_0090278A1BB8
In x64 locate that one and Regtlib.exe_Tool_____A64.3643236F_FC70_11D3_A536_0090278A1BB8
d. Change the Condition from (VersionNT < 600) or Version9X to just VersionNT or Version9X.

Allow .NET 2.0 Framework to get installed on Windows Server 2008

e. Save changes (either to that same MSI or a transform file.)

2.5. Install .NET

Copy the files (the whole folder) to your core machine and start the MSI via this command line (note that you need to use msiexec in order to pass the vsextui=1 parameter):

If you saved a transformed file and are running 64-bit version you will probably run:
%SystemRoot%\system32\msiexec.exe /package "NetFx20_x64\NetFx20a_x64.msi" vsextui=1 transforms="ServerCore.mst"

On x86 without a transform that would be:

%SystemRoot%\system32\msiexec.exe /package "NetFx20_x86\NetFx20a_x86.msi" vsextui=1

That’s it. Now we have .NET installed and can go to the final step – PowerShell installation!

3. Windows PowerShell

There is no PowerShell v1 setup for Windows 2008 (again, because it is supposed to be a component) but you can actually download and install the CTP (note: this is a pre-beta code – not for production use). PowerShell v2 CTP2 is available from Microsoft’s downloads page.

Download the version you need, copy the msi over to the Server Core box and simply run the msi.

4. Enjoy!

Now you can start PowerShell!

Just run:
c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

And you will see the prompt change to: PS C:>

That’s it. Now you are among the first geeks in the Universe to have PowerShell on Server Core!

PowerShell v2 running on Windows Server 2008 Server Core

Acknowledgments: I could only have this all accomplished thanks to the help I got from Alex Kibkalo and a great post by Artem Pronichkin on installing .NET on Server Core.

Tags: , , , ,

Bob Muglia on PowerGUI

Bob Muglia, Senior Vice President of the Server and Tools Business (STB) at Microsoft Bob Muglia is Microsoft’s Senior Vice President of the Server and Tools Business. If you ever attended any major Microsoft conferences like TechEd or IT Forum the chances are that he was the guy delivering that roadmap keynote on the event.

I have just found out that he has commented on the PowerGUI release:

“The availability of PowerGUI to help take advantage of the hugely popular Windows PowerShell is a great example of how Quest Software is enabling customers to derive real value from Windows Server 2008, literally on day one.”

This comes from Quest’s Windows Server 2008 launch press-release. I know that normally press-releases are boring PR stuff, but in this particular case getting a quote like that from someone as senior and important at Microsoft as Bob is a great honor.

And at the end of the day, this is a great way of articulating the value of PowerGUI. Both the admin console and the IDE are aimed to ease the learning curve and let you get the most value out of PowerShell from day 1.

Tags: , ,

PowerGUI RTMs!

PowerGUI 1.0.14 has just got out and this is our first release which does not have the word “beta” in its name!

This RTM labeling is both a sign of the product stability and a result of the feature-richness the product achieved. We believe that PowerGUI is now a great administrative console and scripting IDE for a variety of platforms from AD, Exchange, and Windows Server, all the way to System Center.

Compared to the 1.0.13 beta the following are the key new features:

  1. Debugger: Pipeline debugging – you can go step-by-step through the pipeline and see which objects get processed and how.
  2. Editor: A lot of useful snippets in the editor (just press Ctrl-I or pick the corresponding menu item; we had snippets for a long time but the actual set of them was up to this build very limited.)
  3. Debugger: Breakpoints and Run to Cursor can now be set at any place within any line.
  4. Editor/Debugger options: customize font,select whether you want the PowerShell profile to get loaded, and whether PowerShell runspace needs to be re-initialized for each debug session.
  5. Admin console: Now supports right-click menu and doubleclicks in the data grid so you can use those instead of the Actions pane.
  6. Admin console: You can customize the order of links and actions.
  7. Admin console: Much improved local system, network, AD and Exchange management packs (I am sure Kirk will blog more about this).

And there are tons of other improvements and smaller features. As usual, the full list will be available in the PowerGUI roadmap page.

Needless to say, we are very excited to get the product available on the day of the Windows Server 2008 launch (the first OS to have PowerShell as a built-in component!)

And best of all, the product remains completely free. So whether you are a UI kind of administrator or a scripter – both the PowerShell-based admin console and a great PowerShell IDE are available for you, RTMed, free.

Tags: , ,

PowerGUI Survey – Please respond

question markWe need your help and a couple of minutes of your time. Please go to this survey page and answer 5 simple questions on how you use PowerGUI today and where we should take it in the future.
As you know, our goal with PowerGUI is to keep it free (and as much as possible registration-free as well). However, we need information on how you are using it so we know where to concentrate our development efforts. This survey is one of the ways you can help us with that.

Finally, Quest and Microsoft are looking for joint case-study opportunities around PowerGUI and Windows Server 2008. If you may consider participating in one of those, please indicate it in the survey so we can follow-up and make you one of IT Heroes of tomorrow.

We really tried to keep the survey as short and straight-forward as possible, so we hope you can spare a minute or two on the survey page as a way to support our efforts on maintaining the free PowerGUI tool we all love and use. Thanks! 🙂

Tags: , , , ,

Fine-Grained Password Management post from Tyson

Tyson Kopczynski – the author of Windows PowerShell Unleashed (sample chapter available here) has a post on Managing Fine Grained Password Policies.

In which he also complaints that big vendors – Microsoft in this case – are sometimes releasing features – like BitLocker or fine-grained password policies – without fully providing sufficient management tools to actually use them. Needless to say this is very much inline with what I am thinking on the need for do-it-yourself administrative consoles.

Tyson concludes by the following:

My reply to my co-worker was to use either the PasswordSettingsObject cmdlets from Quest or the PowerGUI snap-in which uses those cmdlets – http://powergui.org/entry.jspa?externalID=882&categoryID=46.

I’ve also previously blogged about both the cmdlets and the UI:

Tags: , , , , , , , , , , , ,

New PowerShell Channel 9 Videos

Two new PowerShell videos just went live on Channel 9:

The PowerGUI one is quite fascinating to watch. This was shot in spring and it is just amazing to compare it to what we have in PowerGUI 1.0.9 today.

[UPDATE] Just noticed that they have also posted a conversation of Don Jones and Jeffrey Snover. For a full list of PowerShell-related Channel 9 videos go to this page.

Tags: , , ,

Longhorn UG in UK, Scotty and Austin Blogging

Just found from Austin Osuide that not only has Windows Server 2008 started (congratulations, Scotty!), they already have the website up and running, and Scotty made Austin start blogging too.

Scotty and Austin have been active members of the PowerShell Usergroup so now the Longhorn group is surely in good hands!

Also, both Austin and Scotty are among the top IT consultants in UK so I hope some of their insight is going to be leak through their blogs. (And thanks for the congratulations, Austin!)

Tags: , , ,

AD PowerShell Webcast in 3 hours

Just a reminder that Quest is giving Webcast: Active Directory Management Made Easy with PowerShell in about 3 hours from now.

Tags: , , , , , , , , , ,

Webcast: Active Directory Management Made Easy with PowerShell

On July 12 I will be co-presenting (with Bob Bobel – Quest’s Senior Product Manager for Active Directory products) at a webcast:

Webcast: Active Directory Management Made Easy with PowerShell

When: Thursday, July 12, 2007 – 10 a.m. PDT/1 p.m. EDT

In this session, we will talk about using Windows PowerShell to manage Active Directory. We’ll cover different approaches ranging from ADSI to AD cmdlets, and demo the features that are backwards-compatible with Windows 2000/2003 and the ones unique to Windows Server 2008 (e.g. Server Core and Read Only Domain Controller).

In the first half of the session, we will also highlight how you can customize and extend provisioning with Quest ActiveRoles Server through PowerShell. In the second half of the session, we’ll demo how you can use PowerGUI to build custom administrative consoles for PowerShell enabled systems, such as Active Directory, IIS, Exchange and Operations Manager.

Register at the webcast page

As you can see from the description besides the general introduction to PowerShell and AD cmdlets you will get exposed to Quest commercial products as well – which can still be pretty handy if you are planning using PowerShell to manage AD in enterprise infrastructure.

You can register here (you might want to pre-register and login in advance because I think those webcasts have limited number of connections).

Tags: , , , , , , , , , ,

Free UI Console for Fine-Grained Password Policies

I spent most of the day today using the password policy cmdlets and the PowerShell UI we all use and love to create graphical user interface for fine-grained password policies (see overviews in 4sysops and Ulf’s blog) in my Windows 2008 lab. And here’s the result (click to see it full size):

Graphical console to manage fine-grained password policies in Windows 2008 domains

What you see on the screen is the graphical user interface to manage those granular password policies and they are far nicer than ADSIEdit. 😉

I included the following functionality:

  • Create new password policy,
  • See password policy properties (PowerGUI adds sorting, filtering, reporting, copy to clipboard and other goodies),
  • Link a password policy to a user or group,
  • Unlink a password policy,
  • Remove a password policy,
  • See the resultant policy for a selected user.

All these operations also support bulk selection.

You can download the pack from PowerGUI library: Fine-Grained Password Policies – please provide feedback so I can make it better.

And, as usual, should you want to learn the command-line or script the same actions, just click the PowerShell Code tab at the bottom of the PowerGUI window – and copy/paste from there.

Dmitry

Tags: , , , , , , , , , , ,


My Recent Tweets

Legal

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 2021
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

%d bloggers like this: