Windows Management Framework V5 Preview

Windows Management Framework V5 Preview

  • Comments 50
  • Likes
Title: Windows Management Framework 5.0 Preview
One goal of management is to simplify creating and operating computing environments.  In Windows Server 2012 R2 we introduced two new standards-based technologies to achieve that: Windows PowerShell Desired State Configuration and Certified for Windows Network Switches.  Both of these generated a lot of excitement with our customers and partners. Today we are announcing the Preview of Windows Management Framework V5 which advances both of these areas and introduces Windows PowerShell OneGet to dramatically simplify finding and installing software on your machines.  OneGet works with the community-based software repository called Chocolatey which has over 1,700 unique software packages.  Step by step, we are delivering the technologies you need to simplify creating and operating your computing environment.
Cheers!  Jeffrey
In this release we have made Windows PowerShell Desired State Configuration (DSC) more stable and reliable by addressing bug fixes, performance improvements and general optimizations. These improvements in combination with our recent release of wave 3 of the DSC resource kit give you what you need to effectively deploy and manage your features, applications and services on all of your Windows environments.  As developers you should be writing DSC providers for your resources to enable customers to use DSC or choose any Configuration Management tool that supports the DSC platform.  If you are considering purchasing a Configuration Management tool, make sure that tool supports DSC or you won’t be aligned with the Windows Server strategy.
In addition to the DSC refresh, WMF 5.0 Preview includes 2 new features OneGet and NetworkSwitch cmdlets.  You can download the WMF 5.0 Preview HERE.

Windows PowerShell OneGet

OneGet is a new way to discover and install software packages from around the web. With OneGet, you can:

·        Manage a list of software repositories in which packages can be searched, acquired, and installed

·        Search and filter your repositories to find the packages you need

·        Seamlessly install and uninstall packages from one or more repositories with a single PowerShell command

This first version of OneGet installs and searches software from Chocolatey repositories.  Support of additional repositories will come in subsequent versions.  Here are some sample commands to get you started:
Import module:
PS> Import-Module -Name OneGet

Enumerate the list of OneGet commands available:
PS> Get-Command -Module OneGet
CommandType     Name                       ModuleName
-----------     ----                       ----------
Cmdlet          Add-PackageSource          OneGet   
Cmdlet          Find-Package               OneGet   
Cmdlet          Get-Package                OneGet   
Cmdlet          Get-PackageSource          OneGet   
Cmdlet          Install-Package            OneGet   
Cmdlet          Remove-PackageSource       OneGet   
Cmdlet          Uninstall-Package          OneGet   

Network Switches

In Windows Server 2012 R2, Microsoft worked with the industry and DMTF (Distributed Management Task Force) to standardize the schema and protocol for managing network switches. We published the Windows Server Logo certification program to ensure interoperability. This effort was part of the Data Center Abstraction (DAL) vision which was led by Microsoft working closely with industry leaders in this space such as: Arista, Cisco and Huawei. Using Windows Server 2012 R2, network switches that pass the Certified for Windows program can now be managed natively by System Center Virtual Machine Manager 2012 R2 (SCVMM) without the need to write custom plugins. You can learn more here
In July of 2013 we published the blog DAL in action: Managing network switches using PowerShell and CIM which described how to manage the network switch via PowerShell by using the CIM cmdlets.
In this release, we have added a set of L2 Layer NetworkSwitch management PowerShell cmdlets to manage Certified for Windows network switches.
The following are some examples for how you can use the NetworkSwitch cmdlets:
Import Module:
PS>import-module .\NetworkSwitch.psd1
Enumerate the list of Network Switch Cmdlets
PS> Get-Command *-NetworkSwitch*
CommandType     Name                                    ModuleName                                                                 
-----------     ----                                    ----------                                                                 
Function        Disable-NetworkSwitchEthernetPort       NetworkSwitch                                                              
Function        Disable-NetworkSwitchFeature            NetworkSwitch                                                              
Function        Disable-NetworkSwitchVlan               NetworkSwitch                                                              
Function        Enable-NetworkSwitchEthernetPort        NetworkSwitch                                                              
Function        Enable-NetworkSwitchFeature             NetworkSwitch                                                              
Function        Enable-NetworkSwitchVlan                NetworkSwitch                                                              
Function        Get-NetworkSwitchEthernetPort           NetworkSwitch                                                              
Function        Get-NetworkSwitchFeature                NetworkSwitch                                                              
Function        Get-NetworkSwitchGlobalData             NetworkSwitch                                                               
Function        Get-NetworkSwitchVlan                   NetworkSwitch                                                              
Function        New-NetworkSwitchVlan                   NetworkSwitch                                                              
Function        Remove-NetworkSwitchEthernetPortIPAdd.. NetworkSwitch                                                              
Function        Remove-NetworkSwitchVlan                NetworkSwitch                                                              
Function        Restore-NetworkSwitchConfiguration      NetworkSwitch                                                              
Function        Save-NetworkSwitchConfiguration         NetworkSwitch                                                              
Function        Set-NetworkSwitchEthernetPortIPAddress  NetworkSwitch                                                              
Function        Set-NetworkSwitchPortMode               NetworkSwitch                                                              
Function        Set-NetworkSwitchPortProperty           NetworkSwitch                                                              
Function        Set-NetworkSwitchVlanProperty           NetworkSwitch  
To manage the switch you will need to create a CIM session connection. You can do this as show in the following example, and store the session context in the $s variable:
PS> $ip = ""
PS> $sessionOption = New-CimSessionOption -UseSsl -SkipCACheck -SkipCNCheck -SkipRevocationCheck
PS> $s = New-CimSession -CN $ip -port 5986 -Auth Basic -Credential admin -SessionOption $sessionOption
Enumerate NetworkSwitch features:
PS> Get-NetworkSwitchFeature -CimSession $s
ElementName      InstanceID           FeatureName       IsEnabled PSComputerName
-----------      ----------           -----------       --------- --------------
SSH              Arista:Feature:2               2            True       
Tacacs           Arista:Feature:3               3            True      
BGP              Arista:Feature:4               4           False      
VLAN             Arista:Feature:5               5            True      
LACP             Arista:Feature:6               6            True      
DHCP             Arista:Feature:7               7           False      
LLDP             Arista:Feature:8               8            True       
Enumerate all ports:
PS> Get-NetworkSwitchEthernetPort -CimSession $s | Format-Table InstanceID, ElementName, MaxSpeed, PortNumber, EnabledState
InstanceID      ElementName            MaxSpeed      PortNumber    EnabledState
----------      -----------            --------      ----------    ------------
Arista:Ether... Ethernet1            1410065408               1               2
Arista:Ether... Ethernet2            1410065408               2               2
Arista:Ether... Ethernet3            1410065408               3               2
Arista:Ether... Management1          1410065408              97               2
Disable port number 3:
PS>  Disable-NetworkSwitchEthernetPort -PortNumber 3 -CimSession $s
                ReturnValue Job                        PSComputerName          
               ----------- ---                        --------------          
Get the state of port number 3:
PS>get-NetworkSwitchEthernetPort -PortNumber 3 -CimSession $s | FT InstanceID, ElementName, MaxSpeed, PortNumber, EnabledState
InstanceID      ElementName            MaxSpeed      PortNumber    EnabledState
----------      -----------            --------      ----------    ------------
Arista:Ether... Ethernet3            1410065408               3               3
Cloud OS Infrastructure Team
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Good News!!!

  • Mmmmmm. Chocolatey.....

  • I really don't like the oneget functionality being stapled to WMF 5. I am not at all opposed to FOSS, but it shouldn't be in WMF 5. It should be a module people optionally choose to install, manually - I recognize that someone who has admin rights can install whatever they want to a machine, and could already use PS to pull from chocolatey if they chose to, but the reality of the functionality is that it's adding a direct line to something I inherently DO NOT TRUST in my environment.

    I think what bothers me about it is that it asserts a false sense of trust - "the oneget module is core to Powershell, the things I can download must be vetted and safe". Few people feel nervous pulling software from for that reason... Chocolatey isn't, though, and just because someone may choose to implicitly trust Microsoft doesn't mean that I trust chocolatey - it's a vector into my machines that I don't trust in the slightest, I applaud open source options and use them a lot myself, but I feel it's a mistake and a security risk to make it a mandatory part of the management framework.

  • @Daniel - You are correct to be concerned about security of downloading and installing community bits. The reality is that you don't know who is vouching for the bits in the community repository and thus whether they can be trusted or not. That is why when you do a Get-PackageSource, you'll see that we let you declare whether a source is TRUSTED or not. By default, the community repository is not trusted and therefore we will ask you about this when you download software from it.

    So yes - it is a concern and you'll see us doing a lot of work in this space but I have nothing to announce today.

    Jeffrey Snover [MSFT[

  • I'm glad to see the package management situation being addressed. I am concerned that OneGet is following the Chocolaty path of installing these packages outside "Program Files*" to thwart UAC. If so, it's a non-starter for the company I work at and me personally.

  • Thank you for your considerations Jeffrey Snover, i'm really exited about this new upcomming version, i hope to see a whole load of new functionalities :)

  • I'm hoping that DSC for switching/routing is on the way. The power of that would be phenomenal.....

  • And once again, Microsoft makes its Operating Systems more like its Linux counterpart. Don't get me wrong, there is nothing wrong with wanting to be like Linux.... but after years of insisting CLI is dead, look where we are.

    On a side note, this is all in the interest of deprecating WMI into a CLI rather than an API, which I think might be a step backwards, but I guess it is more accessible despite going against the current trend of 'program more'

  • Well done, Microsoft! Your very own package manager! Welcome to the 1990's!

  • Good to see package management coming to WMF. Can't wait to start playing with it!

  • Why are you not using a fixed width font in the console? The screenshots will be way nicer...

  • I tried out OneGet module today and its nice(read my review at I am just wondering how many firms will try to make use of it given it is installation from third party web services. If building similar repositories in house is easy, then its a great tool. However, I like the idea very much and looking forward for its evolution in coming releases.

  • stay tuned for updates on new oneget puppet provider I'm writing here-

    Today you can use my chocolatey provider with chocolatey. It rocks.

  • The preview is currently only 2012R2 & 8.1 -- will the GA version include previous Windows versions?

  • Creating private repositories is very simple. One way is to create an empty ASP.NET Web Application in VS and add the nuget.server from the library package manager. Deploy to an IIS host and you're pretty much up and running. We just deployed a nuget server farm and are putting it into production next week. Very easy, very slick.