Scripting. Powershell, VMware, Windows, Active Directory & Exchange. All that kind of stuff…..
RSS icon Email icon Home icon
  • PowerShell v3 – A Quick First Look

    Posted on September 14th, 2011 Jonathan Medd 4 comments

    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:

    
    $host.version.major
    

    And it is a .NET 4 app (CLRVersion)

    
    $psversiontable
    

    From the standard PowerShell modules we have a total of 248 cmdlets

    
    (Get-Command -Module Microsoft.PowerShell.*).count
    

    However, there are a total of 239 modules that have shipped in the OS, though a large part of these are CIM based.

    
    (Get-Module -ListAvailable -All).count
    

    Excluding the CIM modules, there are 44 modules

    
    Get-Module -ListAvailable
    

    And obviously within each module there is plenty of good content:

    
    Get-Command -Module PrintManagement
    

    New Feature!

    In previous versions of PowerShell if you needed to use a cmdlet from a module you first needed to import the module. In v3 the module is loaded when you type the command – even better, you get tab completion on the command before the module is loaded!

    Note how the NetTCPIP module is loaded after a command from the module, Get-NetRoute, is loaded.

    
    Get-Module
    
    Get-NetRoute | Out-Null
    
    Get-Module
    

    Anyone think I should run a blog series called PowerShell 3.0 One Cmdlet at a Time? It might take a while….. ;-)

     

    3 responses to “PowerShell v3 – A Quick First Look” RSS icon

    • Sounds like a good idea although to save you the boredom I’m sure you can batch some Cmdlets together.

      Looks as though they STILL haven’t done anything for DHCP, that brand new technology nobody really uses which refuses to be automated ;-)

    • This was from the client OS, haven’t had chance to look in the server yet with the DHCP role installed…..

    • Awesome! Post more, please!!! :)


    1 Trackbacks / Pingbacks

    Leave a reply