Windows Management Framework V5 Preview


CHF Owner
Oct 31, 2009
Florida U.S.A.
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:

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> $s=New-CimSession-CN$ip-port5986-AuthBasic-Credentialadmin-SessionOption$sessionOption

Enumerate NetworkSwitch features:
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:
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:
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

View the full article
Last edited: