Install PowerShell 7.2 Preview 2 For Windows 10

A single error caused by a human mistake can take alot of time to be get solved, PowerShell can maximum minimize the time consumption as it is possible. It contributes to sysadmins the intelligence to automate numerous tasks crosswise programs. As it enables admins to complete grants to COM and WMI. Both local and remote systems can be managed with PowerShell. Now you can download Powershell 7.2 Preview 2 for Windows from here.

General Cmdlet Updates and Fixes:

  • Write better error message if the config file is broken
  • Make AppLocker Enforce mode take precedence over UMCI Audit mode
  • Add -SkipLimitCheck switch to Import-PowerShellDataFile
  • Restrict New-Object in language mode under lock down
  • The -Stream parameter now works with directories
  • Avoid an exception if the file system does not support reparse points
  • Enable CA1012: Abstract types should not have public constructors
  • Enable SA1212: Property accessors should follow the order

New features

$PSStyle automatic variable for ANSI rendering

When working in the console with a modern terminal, color and text effects can help make text information more interesting and useful.

This experimental feature called PSAnsiRendering exposes a new $PSStyle an automatic variable that can be used for two different purposes.

The first is to make it easier to author text content that contains ANSI escape codes that control text decorations like color, bold, italics, etc…

This example simply dumps the contents of $PSStyle and shows you the members you can use and their effect on text as well as the actual ANSI escape sequence. Note that the custom formatting for this variable includes nested types like FormattingForeground, and Background.

Learn More @

Bug fixes

Some issues that accompanied the previous release of PowerShell have also been addressed with this Preview release.

  • Code Cleanup: Microsoft states that nearly two-thirds of the pull requests have been answered, resulting in a code cleanup. This refers to a piece of code dedicated to cleanup leftover data and other unneeded material from the system after the actual code has been executed.
  • An issue of the users receiving a bugcheck of “Incorrect Function” when trying to use an executable file on a drive that is not in the NTFS format has been addressed. This issue was first experienced with PowerShell 7.1 due to an issue with the reparse points, which has now been fixed.
  • PipelineVariable Common Parameter: This object now correctly contains all of the parameters passed through it, instead of containing just the first input parameter.

Here is the complete changelog:

For Windows 10, Windows 8.1 and Windows 7

For MacOS

For Linux




How to Install PowerShell 7.1 in Windows

By default, you may be restrained from operating custom PowerShell single function commands also known as cmdlets. You will have to change the execution policy. Follow these simple steps to do so.

  • Run the PowerShell on a Windows computer as an administrator.
  • Run the following commands.
    • Get-ExecutionPolicy
    • Set-execution policy unrestricted
  • Enter Y in the prompt
  • Get-ExecutionPolicy

Leave a Comment