9

An overview of Windows PowerShell features in Windows Server 8 Developer Preview

Disclaimer: This article describes features in a preview of the next version of Windows Server, and features described may and probably will change in the final product.

At the BUILD conference in Anaheim, California in September Microsoft released a preview version of the client and server versions of the next version of Windows. We have looked into some of the new features in Windows Server 8 Developer Preview.

Since Windows 7 and Windows Server 2008 R2, Windows PowerShell is built into the operating system and thus the Preview versions of Windows contain a preview of Windows PowerShell 3.0.

Among many new features in PowerShell 3.0 which we will see used in the next version of Windows Server is workflows. The workflow functionality is based on Windows Workflow Foundation, and provides the ability to run complex and large multi-machine management tasks while being repeatable, parallelizable, interruptible, and recoverable.

For those not able to try out the new Preview versions of Windows, another way to explore Windows PowerShell 3.0 is the Community Technology Preview released shortly after the BUILD conference. To read more about new features in PowerShell 3.0, I would recommend the “PowerShell V3 Featured Articles” page on TechNet Wiki.

 

PowerShell modules

As we would expect, there is a great number of new PowerShell modules compared to Windows Server 2008 R2. Note that some modules become available when installing a server role, or the Remote Server Administration Tool for a server role. This applies to the modules marked with a * in the below output:

 

We can see that it is a long list of modules, so let us use Measure-Object to count them:

57 modules were included by default, while an additional 8 become available when installing additional administration tools and server roles. Note that even more modules may be available, since the server we are running in the test-lab does not have all server roles installed.

As you can understand, going through each module in one article is not possible, so we are highlighting some of the more interesting ones.

The Active Directory module which was available in Windows Server 2008 R2 is extended from 76 to 134 cmdlets. Some of the new cmdlets are providing support for managing Active Directory Replication, including sites, site links, subnets, etc. There is also support for managing some new features like Central Access Policies, Central Access Rules, and Claims. If you are interested in learning more about the new claims-based access control features, there are two webcasts on this topic available on Channel 9:

Using claims-based access control for compliance and information governance
Using classification for access control and compliance

 

Another interesting observation is related to Active Directory Deployment. When the Active Directory Domain Services role is installed, and dcpromo.exe is launched, we are presented with the following message:

The Active Directory Domain Services Installation Wizard is relocated in Server Manager. For more information, see http://go.microsoft.com/fwlink/?LinkId=220921

Dcpromo.exe is replaced by a PowerShell module, ADDSDeployment, which contains 73 cmdlets. When using Server Manager to install a domain controller, we are presented with the PowerShell code which will be run at the end of the wizard:

 

Although dcpromo could be scripted in an unattended fashion in earlier versions of Windows Server, we welcome the PowerShell module for Active Directory Deployment.

Another note before leaving the Active Directory topic is the Group Policy module, which also was available in Windows Server 2008 R2. This seems to be almost the same, but there is one important new cmdlet: Invoke-GPUpdate.

There are many more interesting modules, like DhcpServer, DnsServer, FileServer, PrintManagement, and Storage, which we will not cover in this article. For your reference, a cmdlet-overview for all modules included in the Windows Server Developer Preview is exported to an Excel spreadsheet available here.

 

Server Manager

The new Server Manager has the ability to perform operations against multiple machines at the same time, such as adding roles and features. The remoting capabilities in the new Server Manager are based on both PowerShell Remoting (enabled by default in the Preview version) and WMI.

The fact that both the Active Directory Domain Services Installation Wizard and the Active Directory Administrative Center shows the PowerShell code that will execute behind the scenes is very welcome. This is something other Microsoft products, such as Exchange Server 2007/2010 and System Center Virtual Machine Manager have provided for quite some time. A suggestion for this feature to be enabled for all operations in the new Server Manager is available on Microsoft Connect. If this suggestion get enough votes, it may still be possible that Microsoft will implement this feature in the final product, so I strongly recommend that you vote if you agree.

 

Windows PowerShell Web Access

Another interesting feature available in the Windows Server Developer Preview is Windows PowerShell Web Access, making PowerShell available to web browsers and mobile devices. Imagine that you are not in front of your computer when you get a request to unlock an Active Directory user. You can access Windows PowerShell Web Access from your mobile device connected to the corporate wireless network and run Unlock-ADAccount <username>. Screenshots and installation guidance is available in this blog post.

 

Conclusion

The PowerShell coverage in the next version of Windows Server is going to be huge, making Microsofts flagship Windows Server even more enterprise-friendly in terms of automation and administration.

I will round off this article by encouraging you to download and read what is called the Monad Manifesto – the Origin of Windows PowerShell. This is a document written in August 2002 by the inventor of Windows PowerShell, Jeffrey Snover, describing the vision of the project that later became Windows PowerShell. Another recommended reading is Jeffreys recent blog post about the Monad Manifesto.

It is amazing to see how the vision has turned into reality, and also what an important foundation for the next version of Windows Server the new automation framework has become.

 

Filed in: Articles, Online Only Tags: , , , , , ,

9 Responses to "An overview of Windows PowerShell features in Windows Server 8 Developer Preview"

  1. Marco Shaw says:

    “Another interesting observation is related to Active Directory Deployment. When the Active Directory Domain Services role is installed, and dcpromo.exe is launched, we are presented with the following message:”

    If installed via PowerShell, there is no such message though:
    PS>add-windowsfeature ad-domain-services

  2. Correct, but what happens if you start dcpromo.exe manually? Maybe I was unclear, but I launched dcpromo.exe manually. The installation wizard didn`t do it. Just wanted to test what happened, since this was the procedure for promoting a Domain Controller in previous versions.

  3. Boe_d says:

    So if you didn’t set up the domain while installing AD – how do you create the domain?   Why not just leave dcpromo as an option?

    • Jan Egil Ring says:

      If you try to run dcpromo a message pops up stating “The Active Directory Domain Services Installation Wizard is relocated in Server Manager. For more information, see http://go.microsoft.com//fwlink/?linkid=220921“.

      If you close the installation wizard after installing AD DS without launching the AD DS Configuration Wizard, you can launch it later using Server Manager. For further details, have a look at the above URL.

      –Jan–

  4. Songdongkuang says:

    I can’t find secureboot module, how can I add it in the powershell?

    • Jan Egil Ring says:

      Hi,
      Can you see it if you run Get-Module -ListAvailable? If so it should be loaded automatically in PowerShell 3.0. You can also load it manually by using Import-Module SecureBoot.

  5. les privat says:

    Thanks for every other magnificent post. Where else may anyone get that
    kind of info in such a perfect way of writing?
    I’ve a presentation subsequent week, and I am
    on the look for such information.

Leave a Reply

Submit Comment

© 2016 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: