2014/04/06

PowerShell - PowerShell v5 "Preview" available


Wow that was really fast!! In case you missed it last week, PowerShell 5.0 "Preview" has been released by Microsoft part of Windows Management Framework 5.0 (WMF 5.0) Preview. The release of the version 4 was not so long ago (October 2013), Microsoft is definitely increasing the pace of releases.

Download WMF v5 here.



What's New?

This preview release brings the following update/features:
  • Update of PowerShell Desired State Configuration: performance improvements + bug fixes,
  • Module OneGet to manage lists of software repositories, search/acquire/install/uninstall packages 
  • Module NetworkSwitch. to manage Windows network switches

In my opinion, the coolest feature is the module OneGet which allows you manage/install/uninstall packages,  (Linux world has something similar called Apt-Get for a very long time). I think this is a very good news and it will had more flexibility to the sysadmin work.

Once installed,  $PSVersionTable will report the following result :-)  PSVersion: 5.0.9701.0



Upgraded :-)




New Module: NetworkSwitch

I really like what Microsoft is doing ... Interoperability, pushing for a better ecosystem, ... Microsoft is embracing standards-based management to accelerate the process, Windows PowerShell will now allow us to manage Switches very easily. However your switch will need to be "Certified for Windows Program" and able to support CIM /WSMAN standards. Not sure this will be compatible with my lab Switch Cisco SG300-20 but I will investigate :-)
Jeffrey Snover - "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 hereIn 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." Source

Datacenter Abstraction Layer (DAL) Overview - Technet



Here is a list of the cmdlets available to us
Get-Command -Module NetworkSwitch

CommandType     Name                                               Source
-----------     ----                                               ------
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-NetworkSwitchEthernetPortIPAddress          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



New Module: Windows PowerShell OneGet

The coolest news in my opinion is the module OneGet which allow you to install and uninstall packages.
Jeffrey Snover - "... 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..." Source

Here is a list of the cmdlets available to us
Get-Command -Module OneGet

CommandType     Name                                               Source
-----------     ----                                               ------
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

The packages available in this module are the ones from Chocolatey repository.
https://chocolatey.org/packages


There is no documentation so far. But some PowerShellers out there already found a way to define their own repository. +Boe Prox and +Eric Courville are already working on that :-) ! Can't wait to see what they come with.





Thanks for reading! If you have any questions, leave a comment or send me an email at [email protected] I invite you to follow me on Twitter @lazywinadm / Google+ / LinkedIn. You can also follow the LazyWinAdmin Blog on Facebook Page and Google+ Page.

No comments:

Post a Comment