I’ve just downloaded and installed on my Windows 7 workstation Windows Management Framework 3.0 – Beta.
Before this I had Windows Management Framework 3.0 – CTP2 and there were some cool new features already.
If you have installed Windows Management Framework 3.0 Community Technology Preview 1 or Community Technology Preview 2, you must uninstall it before installing Windows Management Framework 3.0 Beta. Also to install Windows PowerShell Integrated Scripting Environment (ISE) for Windows PowerShell 3.0 on computers running Windows Server 2008 R2 with Service Pack 1, before installing WMF 3.0 Beta, use Server Manager to add the optional Windows PowerShell ISE feature to Windows PowerShell
The WMF 3.0 Beta package contains pre-release versions of:
• Windows PowerShell 3.0
• Windows Remote Management (WinRM) 3.0
• Windows Management Instrumentation (WMI)
• Management OData IIS Extensions
• Server Manager CIM Provider
I want to mention some interesting new features and changes for me:
- The Updatable Help system (just run Update-Help). I received this message: Failed to update Help for the module(s) ‘ActiveDirectory, Pscx, WASP’ : The Update-Help command failed because the specified module does not support updatable help. Use Get-Help -Online or look online for help for the commands in this module
- Windows Management Framework 3.0 Beta includes the following 36 new Fully Qualified Error IDs, and corresponding error messages, to help troubleshoot problems with PowerShell Remoting
- Read/Modify/Write operators no longer use dynamic scoping for the Read operation. Also, compound equality operators (including +=, -=, *=, %=, ++, –) do not use dynamic scoping. The variable is always in the current scope:
$x = 1
& { $x += 1; $x }
# Returns 2 in Windows PowerShell 2.0
# Returns 1 in Windows PowerShell 3.0
Rewrite to use only the simple assignment operator:
$x = 1
& { $x = $x + 1; $x}
- Comparing a number to a string behaves differently
1 -eq "1.1" # $true in Windows PowerShell 2.0; $false in Windows PowerShell 3.0 1024 -eq "1kb" # $false in Windows PowerShell 2.0; $true in Windows PowerShell 3.0.
Do not compare strings to numbers. If you must, cast explicitly.
1 -eq [int]"1.1"
- You can access the properties of underlying objects in an array. In Windows PowerShell 2.0, because the array does not have the property, no values are returned
# Access properties of underlying objects $p = Get-Process $p.Name # Windows PowerShell 2.0 returns $null. # Windows PowerShell 3.0 returns process names
- Improved error detection. Example:
"<${}>" # expands to: <$>
+ "<${}>" # expands to: <$>
+ ~
Empty ${} variable reference, there should be a name between the braces.
- Windows PowerShell Core Snap-Ins have been converted to Modules
• Microsoft.PowerShell.Diagnostics
• Microsoft.PowerShell.Host
• Microsoft.PowerShell.Management
• Microsoft.PowerShell.Security
• Microsoft.PowerShell.Utility
• Microsoft.WSMan.Management
- Select-Object does not Process the Entire Collection
In Windows PowerShell 3.0, to improve command execution time, especially when working with large collections, the Select-Object cmdlet now returns after it has processed the number of items specified by the First parameter of Select-Object
- Windows Management Framework 3.0 Beta includes a CIM provider that you can use to manage Windows Server 2008 R2 SP1 and Windows Server 2008 SP2 servers from Server Manager in Windows Server “8”. But with WMF 3.0 Beta and Windows Server “8” the Server Manager Roles page fails to display events from the Windows Event Log of the target computer.
- Windows Management Framework 3.0 Beta is not supported on the Server Core installation option of Windows Server 2008 R2 or Windows Server 2008. You can install the WMF 3.0 package, but the product does not work properly. To remove the package, uninstall it. The Uninstallation feature works properly.
End I’ve found that annoying thing when you place cursor somewhere on console not in the current string and starting typing fixed. Before I should put cursor exactly to the current string