Microsoft Wmf 5.1

-->

Important

WMF 5.1 will be supported on the same systems WMF 5.0 supports, and will install directly over WMF 5.0 if it is present. It is important to note that WMF 5.1 will be required for long-term support of the WMF 5 features. We will continue to support WMF 5.0 for critical security issues for 4 months after WMF 5.1 is released. WMF 5.1 was introduced in the Anniversary update (1607) – you'll need to upgrade to that or higher (preferably 1709) to get WMF 5.1 on Windows 10. 1511 is EOL btw. Correct, and 1607 goes EOL in March 2018. How do I uninstall wmf 3 then install wmf 5.1 in order to get powershell 5.1 on my window 7 machine This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread.

WMF 5.0 is superseded by WMF 5.1. Users with WMF 5.0 must upgrade to WMF 5.1 to receive support.WMF 5.1 requires the .NET Framework 4.5.2 (or above). Installation will succeed, but keyfeatures will fail if .NET 4.5.2 (or above) is not installed.

Download and install the WMF 5.1 package

Download the WMF 5.1 package for the operating system and architecture you wish to install it on:

Operating SystemPrerequisitesPackage Links
Windows Server 2012 R2Win8.1AndW2K12R2-KB3191564-x64.msu
Windows Server 2012W2K12-KB3191565-x64.msu
Windows Server 2008 R2.NET Framework 4.5.2Win7AndW2K8R2-KB3191566-x64.ZIP
Windows 8.1x64:Win8.1AndW2K12R2-KB3191564-x64.msu
x86:Win8.1-KB3191564-x86.msu
Windows 7 SP1.NET Framework 4.5.2x64:Win7AndW2K8R2-KB3191566-x64.ZIP
x86:Win7-KB3191566-x86.ZIP
  • WMF 5.1 Preview must be uninstalled before installing WMF 5.1 RTM.
  • WMF 5.1 may be installed directly over WMF 5.0 or WMF 4.0.
  • It is not required to install WMF 4.0 prior to installing WMF 5.1 on Windows 7 and WindowsServer 2008 R2.

Install WMF 5.1 for Windows Server 2008 R2 and Windows 7

Note

Installation instructions for Windows Server 2008 R2 and Windows 7 have changed, and differ fromthe instructions for the other packages. Installation instructions for Windows Server 2012 R2,Windows Server 2012, and Windows 8.1 are below.

WMF 5.1 Prerequisites for Windows Server 2008 R2 SP1 and Windows 7 SP1

Installation of WMF 5.1 on either Windows Server 2008 R2 SP1 or Windows 7 SP1, requires thefollowing:

  • Latest service pack must be installed.
  • WMF 3.0 must not be installed. Installing WMF 5.1 over WMF 3.0 will result in the loss of thePSModulePath ($env:PSModulePath), which can cause other applications to fail. Beforeinstalling WMF 5.1, you must either un-install WMF 3.0, or save the PSModulePath and thenrestore it manually after WMF 5.1 installation is complete.
  • WMF 5.1 requires at least .NET Framework 4.5.2.You can install Microsoft .NET Framework 4.5.2 by following the instructions at the downloadlocation.

Installing WMF 5.1 on Windows Server 2008 R2 and Windows 7

  1. Navigate to the folder into which you downloaded the ZIP file.

  2. Right-click on the ZIP file, and select Extract All.... The ZIP file contains two files: anMSU and the Install-WMF5.1.ps1 script file. Once you have unpacked the ZIP file, you can copythe contents to any machine running Windows 7 or Windows Server 2008 R2.

  3. After extracting the ZIP file contents, open PowerShell as administrator, then navigate to thefolder containing the contents of the ZIP file.

  4. Run the Install-WMF5.1.ps1 script in that folder, and follow the instructions. This script willcheck the prerequisites on the local machine, and install WMF 5.1 if the prerequisites have beenmet. The prerequisites are listed below.

    Install-WMF5.1.ps1 takes the following parameters to ease automating the installation on WindowsServer 2008 R2 and Windows 7:

    • AcceptEula: When this parameter is included, the EULA is automatically accepted and will not bedisplayed.
    • AllowRestart: This parameter can only be used if AcceptEula is specified. If this parameter isincluded, and a restart is required after installing WMF 5.1, the restart will happen withoutprompting immediately after the installation is completed.

WinRM Dependency

Windows PowerShell Desired State Configuration (DSC) depends on WinRM. WinRM is not enabled bydefault on Windows Server 2008 R2 and Windows 7. Run Set-WSManQuickConfig, in a Windows PowerShellelevated session, to enable WinRM.

Install WMF 5.1 for Windows Server 2012 R2, Windows Server 2012, and Windows 8.1

Install from Windows File Explorer

  1. Navigate to the folder into which you downloaded the MSU file.
  2. Double-click the MSU to run it.

Installing from the Command Prompt

  1. After downloading the correct package for your computer's architecture, open a Command Promptwindow with elevated user rights (Run as Administrator). On the Server Core installation optionsof Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2 SP1, Command Promptopens with elevated user rights by default.
  2. Change directories to the folder into which you have downloaded or copied the WMF 5.1installation package.
  3. Run one of the following commands:
    • On computers that are running Windows Server 2012 R2 or Windows 8.1 x64, runWin8.1AndW2K12R2-KB3191564-x64.msu /quiet.
    • On computers that are running Windows Server 2012, run W2K12-KB3191565-x64.msu /quiet.
    • On computers that are running Windows 8.1 x86, run Win8.1-KB3191564-x86.msu /quiet.

Note

Installing WMF 5.1 requires a reboot. Using the /quiet option will reboot the system withoutwarning. Use the /norestart option to avoid rebooting. However, WMF 5.1 will not be installeduntil you have rebooted.

-->

WMF 5.0 Changes

  • PowerShell 5.0 adds a new structured Information stream
  • Improvements to DSC including four new DSC resources:
    • WindowsFeatureSet
    • WindowsOptionalFeatureSet
    • ServiceSet
    • ProcessSet
  • Added Just Enough Administration to enable role-based administration through PowerShell remoting
  • PowerShell 5.0 extends the language to include user-defined classes and enumerations
  • Improved debugging features in PowerShell ISE and added remote debugging
  • Added the PowerShellGet and PackageManagement modules
  • Enhanced PowerShell script logging and transcripts
  • Add Cryptographic Message Syntax cmdlets
  • WMF 5.0 includes the NetworkSwitchManager module for Windows
  • Added the Microsoft.PowerShell.ODataUtils module
  • Added support for Software Inventory Logging (SIL)
  • Sever new or update cmdlets in response to user requests and issues

WMF 5.1 Changes

WMF 5.1 includes the PowerShell, WMI, WinRM, and Software Inventory Logging (SIL) components thatwere released with Windows Server 2016. WMF 5.1 can be installed on Windows 7, Windows 8.1, WindowsServer 2008 R2, 2012, and 2012 R2, and provides several improvements over WMF 5.0 including:

  • New cmdlets
  • PowerShellGet improvements include enforcing signed modules, and installing JEA modules
  • PackageManagement added support for Containers, CBS Setup, EXE-based setup, CAB packages
  • Debugging improvements for DSC and PowerShell classes
  • Security enhancements including enforcement of catalog-signed modules coming from the Pull Serverand when using PowerShellGet cmdlets
  • Responses to a number of user requests and issues

Important

Before you install WMF 5.1 on Windows Server 2008 or Windows 7, confirm that WMF 3.0 isn'tinstalled. For more information, seeWMF 5.1 Prerequisites for Windows Server 2008 R2 SP1 and Windows 7 SP1.

PowerShell Editions

Starting with version 5.1, PowerShell is available in different editions that denote varyingfeature sets and platform compatibility.

  • Desktop Edition: Built on .NET Framework and provides compatibility with scripts and modulestargeting versions of PowerShell running on full footprint editions of Windows such as Server Coreand Windows Desktop.
  • Core Edition: Built on .NET Core and provides compatibility with scripts and modules targetingversions of PowerShell running on reduced footprint editions of Windows such as Nano Server andWindows IoT.

Learn more about using PowerShell Editions

Module Analysis Cache

Pro

Starting with WMF 5.1, PowerShell provides control over the file that is used to cache data about amodule, such as the commands it exports.

By default, this cache is stored in the file${env:LOCALAPPDATA}MicrosoftWindowsPowerShellModuleAnalysisCache. The cache is typically readat startup while searching for a command and is written on a background thread sometime after amodule is imported.

To change the default location of the cache, set the $env:PSModuleAnalysisCachePath environmentvariable before starting PowerShell. Changes to this environment variable will only affect childrenprocesses. The value should name a full path (including filename) that PowerShell has permission tocreate and write files. To disable the file cache, set this value to an invalid location, forexample:

This sets the path to an invalid device. If PowerShell can't write to the path, no error isreturned, but you can see error reporting by using a tracer:

When writing out the cache, PowerShell will check for modules that no longer exist to avoid anunnecessarily large cache. Sometimes these checks are not desirable, in which case you can turn themoff by setting:

Setting this environment variable will take effect immediately in the current process.

Microsoft Wmf 5.1 Software

Specifying module version

In WMF 5.1, using module behaves the same way as other module-related constructions in PowerShell.Previously, you had no way to specify a particular module version; if there were multiple versionspresent, this resulted in an error.

In WMF 5.1:

  • You can useModuleSpecification Constructor (Hashtable).

    This hash table has the same format as Get-Module -FullyQualifiedName.

    Example:using module @{ModuleName = 'PSReadLine'; RequiredVersion = '1.1'}

  • If there are multiple versions of the module, PowerShell uses the same resolution logic asImport-Module and doesn't return an error--the same behavior as Import-Module andImport-DscResource.

5.1

Download Windows Management Framewo…

Improvements to Pester

Microsoft Wmf 5.1 Pdf

In WMF 5.1, the version of Pester that ships with PowerShell has been updated from 3.3.5 to 3.4.0.This update enables better behavior for Pester on Nano Server.

You can review the changes in Pest by inspecting the ChangeLogin the GitHub repository.