The second Community Technology Preview of PowerShell V3 is now available. This pre-beta release gives of a flavour of areas of change which may appear in the final release. A CTP has an emphasis on Community , i.e. the PowerShell team is looking for plenty of feedback for this release while they still have time to change things. Below are items logged on Connect by the community which have been fixed since the release of CTP1 - so if you find an issue in your testing, please log it on Connect so it can be reviewed and potentially resolved.
*****Warning. This is from a preview release******
PowerShell ISE in v2 allowed you to create your own custom menu items via PowerShell script (a good example can be found on the Hey Scripting Guy blog)
PowerShell ISE in v3 ships with an Add-on built in called Commands. This Add-on places (by default) a Commands entry in the Add-on Tools Pane as below:
This Add-on is a very useful learning and reference tool since it provides access to help info for cmdlets and will help you add the necessary parameters you are looking for.
*****Warning. This is from a preview release******
When using a hashtable in PowerShell v2 the insertion order is not preserved. So I might be slightly OCD, but this bugs me:
$HashTableOld = @{a=1; b=2; c=3; d=4} $HashTableOld If you consider the type of the object you will see that it is of .NET type System.Collections.Hashtable
$HashTableOld | Get-Member In PowerShell v3 it is now possible to create an ordered hashtable using the [ordered] syntax
*****Warning. This is from a preview release******
PowerShell v2 brought the ability to create a custom object via the following method:
$CustomObject1 = New-Object psobject -Property @{a=1; b=2; c=3; d=4} $CustomObject1 | Format-List PowerShell v3 brings the possibility to create a custom object via
[pscustomobject]
$CustomObject2 = \[pscustomobject\]@{a=1; b=2; c=3; d=4} $CustomObject2 | Format-List Note: both methods create a PSCustomObject with NoteProperties, not a hashtable object
$CustomObject1 | Get-Member $CustomObject2 | Get-Member So, why would you want to do it this way?
*****Warning. This is from a preview release******
In Windows Server 2008 R2 there were a number of modules included for managing typical server roles such as Active Directory, Failover Clustering etc. However, there were some noteable absentees, such as DHCP server.
You may ask why am I highlighting PowerShell cmdlets for DHCP, well:
Fellow London VMUG regular Julian Wood commented on my PowerShell v3 First Look Post asking if there were DHCP cmdlets this time.
*****Warning. This is from a preview release******
Not everybody uses the PowerShell ISE as their primary script editor. However, if you do, or if you are using it to quickly edit a script not on your primary workstation then you will be pleased to see that in v3 it now has IntelliSense. In both the Input pane and the Script Editor.
From the Input pane:
This also works for commands in modules not loaded yet, such as Get-NetIPaddress.
A preview (emphasis on the preview) of PowerShell v3 was made available in the early hours of this morning following the announcement at the Build conference. Apparently they are also planning to ship something with it called Windows 8. You can download the Windows Developer preview from MSDN to get an early look at it.
Well we know for sure that it is new:
and it is version 3: