James O'Neill's blog

Windows Platform, Virtualization and PowerShell with a little Photography for good measure.
Posts
  • James O'Neill's blog

    Managing Windows Update with PowerShell

    • 9 Comments

    I mentioned some of the server management and config tools I’ve been creating with Server 2008 R2 core in mind, and I’m going to put the major bits here. I’ll post the whole script at the end of the set of posts but for now here is the code to look after Windows update

    First I created two hash tables to map the numbers used in the functions to some meaningful text

    $AutoUpdateNotificationLevels= @{0="Not configured"; 1="Disabled" ; 2="Notify before download"; 
    3="Notify before installation"; 4="Scheduled installation"}
    $AutoUpdateDays=@{0="Every Day"; 1="Every Sunday"; 2="Every Monday"; 3="Every Tuesday"; 4="Every Wednesday";
    5="Every Thursday"; 6="Every Friday"; 7="EverySaturday"}

    Next, there is a COM object for everything relating to auto-update. It has a settings property which contains the notification level and update days, the hour at which updates are fetched and how recommended updates are processed.  Setting the properties is pretty easy, and there is is a save method to commit them  - I’ve been lazy here and haven’t got a hash table mapping names to numbers for the notification level so or multiple switches so the user would need to know that notification levels in the hash table (or enter  $AutoUpdateNotificationLevels at the prompt to see what is in the table) – I might fix that for the final script.

     Function Set-WindowsUpdateConfig
    
    {Param ($NotificationLevel , $Day, $hour, $IncludeRecommended)
    $AUSettings = (New-Object -com "Microsoft.Update.AutoUpdate").Settings
    if ($NotificationLevel)  {$AUSettings.NotificationLevel        =$NotificationLevel}
    if ($Day)                {$AUSettings.ScheduledInstallationDay =$Day}
    if ($hour)               {$AUSettings.ScheduledInstallationTime=$hour}
    if ($IncludeRecommended) {$AUSettings.IncludeRecommendedUpdates=$IncludeRecommended}
    $AUSettings.Save
    }

    To show what the settings are, I decode them and return a custom object with the decoded properties.

    Function Get-WindowsUpdateConfig
    
    {$AUSettings = (New-Object -com "Microsoft.Update.AutoUpdate").Settings
    $AUObj = New-Object -TypeName System.Object
     Add-Member -inputObject $AuObj -MemberType NoteProperty -Name "NotificationLevel"   `
        -Value $AutoUpdateNotificationLevels[$AUSettings.NotificationLevel]
    Add-Member -inputObject $AuObj -MemberType NoteProperty -Name "UpdateDays"      `
           -Value $AutoUpdateDays[$AUSettings.ScheduledInstallationDay]
    Add-Member -inputObject $AuObj -MemberType NoteProperty -Name "UpdateHour"        `
       -Value $AUSettings.ScheduledInstallationTime Add-Member -inputObject $AuObj -MemberType NoteProperty -Name "Recommended updates" `
    -Value $(IF ($AUSettings.IncludeRecommendedUpdates) {"Included."}  else {"Excluded."}) $AuObj
    } 

    Checking on MSDN I found there is another object used in a script WUA_SearchDownloadInstall , which does what it says – it searches Windows update for updates, downloads them and installs them I added the logic to my function to over-ride the selection criteria, and auto-Restart if a restart is needed. Since it is sometimes useful to patch Virtual Machines, then shut them down, then Patch the host and then reboot it and bring the VMs back again , I’ve also put in a shutdown after Update switch.

    The logic is simple enough, create a Session object which has CreateSearcher, CreateDownloader and CreateInstaller Methods. Then create a searcher and use it to get updates matching the default or specified criteria. If there are any updates, create a downloader object, hand it the list of updates found by the searcher and start a download. If the download completes successfully, filter out the successfully downloaded items, and pass those into a newly created installer object. Run the installation process and afterwards output a table showing the state of the updates. Finally reboot if needed.

    Function Add-WindowsUpdate
    
    {param ($Criteria="IsInstalled=0 and Type='Software'" , [switch]$AutoRestart, [Switch]$ShutdownAfterUpdate)
    $resultcode= @{0="Not Started"; 1="In Progress"; 2="Succeeded"; 3="Succeeded With Errors"; 4="Failed" ; 5="Aborted" }
    $updateSession = new-object -com "Microsoft.Update.Session"
    write-progress -Activity "Updating" -Status "Checking available updates" 
    $updates=$updateSession.CreateupdateSearcher().Search($criteria).Updates
    if ($Updates.Count -eq 0)  { "There are no applicable updates."}  
    else {
           $downloader = $updateSession.CreateUpdateDownloader()
           $downloader.Updates = $Updates 
            write-progress -Activity 'Updating' -Status "Downloading $($downloader.Updates.count) updates" 
           $Result= $downloader.Download() 
           if (($Result.Hresult -eq 0) –and (($result.resultCode –eq 2) -or ($result.resultCode –eq 3)) ) {
    
           $updatesToInstall = New-object -com "Microsoft.Update.UpdateColl"
           $Updates | where {$_.isdownloaded} | foreach-Object {$updatesToInstall.Add($_) | out-null }
           $installer = $updateSession.CreateUpdateInstaller()
           $installer.Updates = $updatesToInstall
           write-progress -Activity 'Updating' -Status "Installing $($Installer.Updates.count) updates'
            $installationResult = $installer.Install()
            $Global:counter=-1
            $installer.updates | Format-Table -autosize -property Title,EulaAccepted,@{label='Result';
                                   expression={$ResultCode[$installationResult.GetUpdateResult($Global:Counter++).resultCode ] }}
           if ($autoRestart -and $installationResult.rebootRequired) { shutdown.exe /t 0 /r }
           if ($ShutdownAfterUpdate) {shutdown.exe /t 0 /s }
    }
    } }

    So now I can run
    Add-WindowsUpdate –Auto to download updates and reboot if needed,
    Set-WindowsUpdateConfig –n 4 –i to schedule updates (Including the merely recommended)  and
    Get-WindowsUpdateConfig

    So next up it’s Get-RemoteDesktopConfig and Set-RemoteDesktopConfig.

  • James O'Neill's blog

    Checking and enabling Remote Desktop with PowerShell

    • 6 Comments

    A couple of posts back I mentioned that I was working on a configuration library for Server 2008 R2 Core and Hyper-V Server R2 and this includes checking and setting the configuration for remote desktop.

    It turns out that this is controlled from just 2 registry entries – hence it is controlled by the SCRegEdit script. One turns is fDenyTSConnections under  'HKLM:\System\CurrentControlSet\Control\Terminal Server' and the other is UserAuthentication  under 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. So if the Values exist they appear as Item property in PowerShell and can be set, otherwise it can be created. I’ve found the safest way is to try to set  the value and trap the error which occurs if it doesn’t exist then create it specifying that it is a DWORD. So my function enables RemoteDesktop UNLESS –Disable is specified , and -lowSecurity is a boolean which tells it whether to demand user stronger authentication.

     

    Function Set-RemoteDesktopConfig 
    
    {Param ([switch]$LowSecurity, [switch]$disable) if ($Disable) {
    set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'`
    -name "fDenyTSConnections" -Value 1 -erroraction silentlycontinue if (-not $?) {new-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' `
    -name "fDenyTSConnections" -Value 1 -PropertyType dword }
           set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' `
    -name "UserAuthentication" -Value 1 -erroraction silentlycontinue
          if (-not $?) {new-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp'
    -name "UserAuthentication" -Value 1 -PropertyType dword}
    }
    else {
    set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' `
    -name "fDenyTSConnections" -Value 0 -erroraction silentlycontinue
            if (-not $?) {new-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' `
    -name "fDenyTSConnections" -Value 0 -PropertyType dword }
           if ($LowSecurity) {
    set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp'`
    -name "UserAuthentication" -Value 0 -erroraction silentlycontinue
            if (-not $?) {new-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp'`
    -name "UserAuthentication" -Value 0 -PropertyType dword}
    }
         } 
    
    }

    Finding out what the settings are is even easier.

    Function Get-RemoteDesktopConfig
    {if ((Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server').fDenyTSConnections -eq 1)
    
              {"Connections not allowed"}
    elseif ((Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp').UserAuthentication -eq 1)
             {"Only Secure Connections allowed"}
    else {"All Connections allowed"}
    }

    The next part of the configurator to share will be for checking and setting firewall rules.

  • James O'Neill's blog

    PowerShell 2, Server Core R2 and Hyper-V server R2

    • 2 Comments

    With all the betas out at the moment I’ve been trying to get up to speed on both Windows 7 (by using it) and Windows Server 2008 R2 , and Hyper-V server R2 as well.

    If you’re a regular reader you won’t be surprised to know that I’m excited by what’s coming in PowerShell. PowerShell V2 is better in a lot of regards,although I’m not getting the best out of it yet. Quite aside from the graphical editor, the additional cmdlets, and the restored ability of Windows to drag and drop a file into a command window. It’s got better tab expansion. PowerShell has its own function you can customize for tab expansion, and there are two improvements in V2. The first is that tab expansion finds functions you have written as well as built in cmdlets. Much typing and confusion saved there… but something I only noticed today is that it expands parameters: can’t remember if you named a parameter “-Path” or “-VHDPath” just type the – sign and hit [Tab] and it cycles through the list. It sounds like a feeble reason to upgrade but trips back to a script file to find a parameter add up to a fair old chunk of time saved.

    The other thing which is big news is the ability to run PowerShell on Core and on Hyper-V server. Unlike the full servers PowerShell is not installed by default (I’ve no idea why it is on one and not the other). Of course you shouldn’t be going the console of a Core / Hyper-V server box to do admin. But the ability to “remote” PowerShell  is a biggy. If PowerShell is installed AND remote management via WinRM is enabled then you can run any PowerShell command on a box in your data centre from your desktop machine. Of course from my point of view the this is a great push for my PowerShell library for Hyper-V on Codeplex – incidentally an update has been waiting for me to put the finishing touches to it since before Christmas and should appear shortly.

    I’ve been looking at the Hyper-V configurator from R2

    ===============================================================================
                                Hyper-V Configuration
    
    ===============================================================================

     

    1) Domain/Workgroup:                    Workgroup:  WORKGROUP
    2) Computer Name:                       WIN-75FRHHINP4U
    3) Network Settings
    4) Add Local Administrator

    5) Windows Update Settings:             Manual 6) Download and Install Updates 7) Remote Desktop:                      Enabled (all clients) 8) Failover Clustering Role             Enabled 9) Configure Remote Management

    10) Regional and Language Options
    11) Date and Time

    12) Do not display this menu at login
    13) Log Off User
    
    14) Restart Server
    15) Shut Down Server
    16) Exit to Command Line

    Some of the things it does are native PowerShell commands, for example V2 has commands for renaming a server, adding it to a domain, rebooting it and shutting it down

    Rename-Computer –New “Core-27” 

     

    Add-Computer –DomainName “Contoso” –Reboot

    Stop-Computer

    Restart-Computer

    Are all pretty easy to understand - Not many people I meet can give me the command lines for NetDom and Shutdown to do the same things. Three more commands cover the regional/language and Date/Time options and logging off

    control.exe "intl.cpl"
    
    control.exe "timedate.cpl"

     

    Logoff.exe

    So what about the other options. Remote Desktop,  Networking, Cluster installation, Windows Update (settings and download) , Adding local Admins and configuring Remote Management ? If NetDom and ShutDown aren’t easy to remember, NetSH, ScReg, WinRm and the others are worse. Well I’ve been coding them up, and a couple of hundred lines thrown together over the weekend do what it took a coupe of thousand lines of VBscript to do. That’s not entirely a fair comparison because the VB Scripts which come with the OS are designed to be portable across languages, provide help and catch errors way beyond what I do in PowerShell.

    I’ll break that code into a bunch of easy to digest posts over the next few days.

  • James O'Neill's blog

    Windows 7 – not a very well kept secret

    • 4 Comments

    We’ve got a projector in the office which gathers various streams of news and shows them on the wall, and today it keeps talking about Windows 7. It seems SteveB is making a speech tonight and everyone expects it to announce the beta of Windows 7. (Mary Jo has some more ideas what he might say)

    So in preparation for its arrival here are a handful of thoughts about beta testing , and the next version of Windows.

    1. Remember what a beta is for. It’s a two way thing; you discover what might have problems, what’s new and great and what’s new that you just don’t like. You test thoroughly. Try those crappy old apps and old bits of hardware (I’m told that some things which need coaxing to work on Vista are more likely to work on 7 out of the box. If it can’t be made to work on Vista with the app compat toolkit,  it probably can’t be made to work on 7 either). It might also be your first tilt at IE 8.  But it is a two way process: if you find something which doesn’t work we want you to report it. That was our reason for  letting you have it.

    2. Products ship when they are ready part 1. I’ve seen all kinds of rumours about when Windows 7 client and Server 2008 R2 will ship. One intriguing one is that PCs shipped after July 1 will get a free upgrade. Free upgrades from RTM onwards used to be the rule. With Vista we had upgrades 24th October 2006, and RTM was in November. If this rumour is turns out to be true that says a release will not be much after July 1. I’ve always reckoned on 3-4 months for a beta and a month for a release candidate as a good rule of thumb. There isn’t time to do usual two betas and two or three release candidates by July, which makes another rumour – of only one beta the only way that will work. I don’t have any inside scoop on this.  We said the new client OS be 3 years after Vista. Exactly 3 years means RTM in November and launch parties in 2010 - nice fit for my timescales for 2 betas and 3 RCs .  Unless something is said in the Ballmer speech remember my old saying, those who really know don’t talk and those who talk don’t really know. Some great things are already being said about 7, but

    3. Products ship when they are ready, part 2. A beta, by definition is not ready. Life will not be free of all disruption I’d be surprised if anything in the a beta OS trashes my data. But staring at a dead file system with nothing to do but mutter “that was a surprise” * isn’t something I’m going to let happen. So I’m going to try to get a fresh hard-disk and copy my data to it and leave the old one alone. And I’m going to be sure to test the backup and restore system :-) 

    4. A lot will be written about the OS, much will be junk . Jason Perlow at ZDNET gives a great example. “There’s no run menu”. Press the [Window] key instead of [Window] & [R] or click start (rather than click start, click run) and type what you would have typed in the Run box. It works the same, and its quicker. And it finds things before you’ve typed the whole name. The mentality of saying “I must have my run box in floating window named run and it can’t be merged with search” is just… well, Jason’s colleague  Ed Bott just stops short of calling him a luddite. There are other good points in Ed’s post too. I’ve long held that he knows what he’s talking about.

     

     

     

    * Back in my days in Microsoft consulting services , we would be asked to review designs and tell the customer that they good be guaranteed to work. I’d always explain that such guarantees are impossible but we can say we’ve reviewed it and if competently implemented nothing about it leads us to expect a problem. Of course if a problem arises we will say “COR ! That was unexpected”. That always raised a laugh, but the serious point was we

     

     

     

    Technorati Tags:
  • James O'Neill's blog

    A couple more neat things in Windows 7 – printing and the task bar.

    • 2 Comments

    A while back I wrote about exhibiting Aspergers type behaviours and as well as hating background noise this also manifests itself in a powerful dislike of things bouncing round on the screen. Putting “Flash” into the search box on this blog will show you how I feel about web sites where the designers just can’t let things BE STILL

    Of course it isn’t just web designers…. lots of things want to put something on your Windows System tray, and none of those wants to be still either. Our OEMs have a lot to answer for in this regard – and since the US courts clamped down on us telling them they must install this and must not install that, we can’t stop them. Toshiba loaned us a Machine recently and I couldn’t believe the pile of stuff that was on it; Ebay and Amazon sidebar gadgets , there were 16 Icons on the desktop and the tray looked like this

    image

    And that’s a NEW PC, it probably explains a good number of the Vista horror stories. Sometimes it feels like you’re in a battle of wits with the developer to remove these things – Apple now allow you to turn off the tray icon . 

    Windows 7 has the ability to say “Hide these things from the tray” or “Only display them when they pop up a notification.”. That’s better already.  

     

    image

    When I printed something this morning up came the pop-up to say my document printed I wanted it killed off at source, rather than suppressed so off I went to the printers folder where a new item “default printers” caught my eye.

    Oh, now that’s neat: when I’m on my home network make my home printer my default, and when I’m at work make the office printer the default.  Perhaps I should explain here for those who haven’t worked  with Vista, that it understands that different networks are … different. Oh that we could make everything network location aware. IE could use different proxy settings, Outlook could switch to RPC over HTTP when it wasn’t on the office network and so on. One step at a time I guess). Now to investigate whether I can get different site/subnet configurations to be different networks ….

    Before I leave the task bar as a topic here’s one more thing that isn’t life changing but shows how 7 just has this drip, drip, drip of improvements.

    image

    Here’s my task bar from a few minutes ago. Notice how the background for the IE icon is green. The green spreads like a progress bar while a download is in progress. So I can tell the large download (whose progress Window is hidden underneath something) has completed. This idea of finding stuff which has vanished beneath your other windows is one the 7 team seem to have taken to heart.

  • James O'Neill's blog

    PowerShell and the smarter command line.

    • 0 Comments

    I mentioned I was doing some PowerShell work to manage configuration on the R2 versions of Windows Server 2008 Core and Hyper-V server (which now support PowerShell), and somebody in Redmond asked me if I knew  there were tools out there to do this job. …

    I was thinking about how we find stuff, and I was something I wrote about Taxonomy came to mind.

    Store data in the data, not in the field name. Do not create a long list of properties with yes/no answers. Not only is this awkward for users, but the sequence “Relates to product A, Relates to product B” stores Yes and No as the data. A multi select box “Relates to products...” stores the information where you can search it.  (This was dealing with document properties in the first release of Sharepoint Portal Server.) 

    What has this got to with command lines ? It’s about thinking where the meaning is. I would say that it is true and self evident that the commands we enter should reflect the task being carried out. But (pre-PowerShell at least) it doesn’t happen. For example: suppose you want to configure Automatic Updates on Server 2008. If you run the full version of Server, the option is on the front page of Server Manager. But if, instead, you run the Core version, then what do you type at the command prompt ?  (HELP won’t give you the command). You can trawl through all the .EXEs .BATs, .CMDs, VBSs, .WSFs and so on but you won’t find anything with a name like AUCONFIG. If you’re lucky you’ve got the core guide from the Windows Server 2008 step-by-step Guides page. That will tell you that you need to run

    cscript scregedit.wsf /AU 4

    The part which identifies the task (set updates to automatic) isn’t the script name (SC Reg Edit) but the switches /AU and 4 if the task was to set updates to disabled the switches would be /AU and 1. Traditional command line tools have a name which reflect what they ARE –the Server Core Registry Editor ScRegEdit in this case. These tools are overloaded carrying out different tasks based on their switches ( if you want a worse case, look at the Network Settings Shell – NetSh).

    At the command prompt there is no way to discover the tasks you can carry out and their Command+Switch or Command+Switch+Value combinations ; you have to resort to product documentation, training or a helpful expert who already knows that /AC tells SCRegEdit you want to Allow Connections (via terminal services) but /AU sets Auto Updates (where else does 1 mean disabled ? ).  By contrast PowerShell would have multiple commands for the different tasks – with names which reflect what they DO “Get-UpdateConfig” , “Set-UpdateConfig”, “Get-RemoteDesktopConfig” , “Set-RemoteConfig”. The commands are easily discoverable: and having found you have Set-UpdateConfig the tab key helps you to discover switches like –Disabled –InstallConfirmation –DownloadConfirmation and -Automatic  instead of 1,2,3 and 4 used by ScRegEdit /au

    It’s easy to see how the command line tools that we have grew up: and SC Reg Edit edits the registry on Server Core (hence the name) /AU sets the registry entries for auto Update and so on. But understanding it doesn’t remove the desire for PowerShell naming and discoverability. V2 introduces ReName-Computer and Add-Computer – (if you ask Add Computer to what the help will tell you it is a to a domain or workgroup). These tasks were previously done by the NetDom program, with its switches My aim is to add  commands like Get-UpdateConfig” , “Set-UpdateConfig”, “Get-RemoteDesktopConfig” , “Set-RemoteConfig”  “Get-IPConfig” and “Set-IPconfig” (and a few more) at their simplest these can be wrappers for SCRegEdit , Netdom, NetSh, Net, and the others, but the ideal is to go straight to management objects instead.

    So next I’ll look at a couple of the simpler ones.

  • James O'Neill's blog

    Lies,Damn lies and licence interpretations.

    • 4 Comments

    From time to time people ask me who I write for, and I always say I write for myself in the hope that there are enough people out there like me to make a reasonable size audience. It always surprises me how many people inside Microsoft read this blog, not to mention the number of competitors who come here to read my impeccably researched and completely impartial comments (and in return I read their lies, twisted truths and false malicious implications. Ha. Ha.)

    Someone pointed me to a post of Mike DiPetrillo's from just before Christmas with the so charming title of “Microsoft lies to their customers again.”. Mike’s beef is that people who work for Microsoft have said things to customers which contradict what we have posted in public. Unwilling to resist a good title, he’s chosen to make this ineptitude sound like some sort of corporately organized conspiracy… The odd thing is that he is complaining about something you’ll hear people from his company say. During  2008 people from VMware complained that Microsoft was playing dirty with licensing rules for virtualization – that VMware could not use the bundled instances of the operating system included with Enterprise and Datacenter versions of Server 2003 R2 and Server 2008. Allowing customers to do less with your product if they also buy someone else’s product tends to have regulators beating your doors down. If customers get a certain number of bundled instances with a licence that has to apply regardless of the virtualization technology. Indeed, I constantly have to explain to people the reason that you can’t use anything but virtualization on top of Windows Server Enterprise with the full compliment of 4 VMs is that if you did that you’d have 5 working copies of Windows vs 4 with VMware and someone would cry foul. We put out a Licensing FAQ to try to make things clear. (I wish we lived in a world where the licence agreements could be so clear that no FAQs were needed but legal documents and clarity rarely go together).
    However… Not everyone at Microsoft understands all the nuances of licensing, or government regulation. Every so often I see someone saying “VMware told my customer they could assign a server licence to a box and use that licence for windows VMs running on VMware. Where do I find something to fight that lie” and some kindly person has to point out it is no lie, and steer the poor chap to the FAQ.  If anyone out there meets Microsoft people who are still getting this wrong (and don’t have a better channel) mail me and I’ll gently set them straight.

    [Update] The rest of this post has been overtaken by events - it is easier to remove it than to explain...

  • James O'Neill's blog

    My first couple of hours with Windows 7

    • 2 Comments

    I don’t talk much here about occasions when Microsoft’s internal workings get silly, but the last couple of days have been funny. We were fore-warned that Steve B would be announcing Windows 7 beta availability in his CES speech, but to prevent leaks the software was kept on very limited distribution until it went public. Then the folks in Microsoft IT had to put copies on various servers for us to download. Those servers took an absolute pounding. Some people were downloading from Technet and MSDN because too many people where hitting the main European software distribution server – I could visualize network cables glowing red hot. Since nobody told the people who manage the stationery cupboards what was about to happen, blank DVDs were in short supply – I was slow off the mark and had to get mine from another building.

    I installed Windows Server 2008-R2 on Thursday evening, I’ve been doing my 3 laptop virtualization demo using a second hard disk to turn my every-day working dell into a second server.  I want to be able to show the new virtualization features with R2 but still show what they can do with the software that’s shipping today (and it will be a little while before the SCVMM team have an update to support R2). So I need these to Dual boot;  you may have read that R2 adds support for booting from a VHD file, and I decided to make use of that -  give or take a minor headache with the initial configuration it works well. This feature is public, but the only document I have with instructions has got confidential on it, so I’m going to wait a bit before posting instructions or a community clips video on how to make it work.

    The next question was what to do for a Windows 7 client. My Vista machine’s hard disk needs a major clear out, and I really wanted to use a clean disk, and my only “spare” is dual booting the two server OSes. So I needed another drive and off I went to Scan where a 120GB 7200 RPM disk is £25 plus taxes and delivery: ordered on Thursday, the courier tried to deliver it at lunch time on Friday. The longest part of installing 7 turned out to be going to the courier’s depot and fetching the drive. Installation from Power-up to first logon was 30 minutes including formatting the drive. Incidentally , Viral has coverage of an issue affecting Product keys I got a key from Technet, but I’ve opted not to enter it yet, there’s a 30 day grace period.

    I don’t wimageant to turn into a broken record here, but it is a beta and that means for testing not production. The licence is pretty clear on this .

     

    I’ve said before that testing a client OS tends to mean running it as an every day OS, even though you can’t put it into full scale production. Is it up to the job ?

    It’s not a major release, but a .1 release building on existing work so it shouldn’t have too many rough edges. And it doesn’t. The first impression is it feels like a finished OS. It also shouldn’t be a radical departure from the .0 release. And it isn’t. I was a little surprised to find that there was no Nvidia driver in the box, but the Vista drivers for that and for my Hauppauge TV stick installed with no problem at all. My generic web cam and Express-Card SD reader were no trouble, I’ll grab some other USB devices and see how they fare over the weekend.

    Since I mentioned the TV stick, the beta is ultimate edition so includes Media Center, which has had a minor face lift and looks … crisper is the word which springs to mind. Media player on the other hand carries has a 2006 copyright date on it and is barely changed. (No podcast support). And at least as far as my Pentax PEF files are concerned support for previewing RAW images in explorer still left to the camera makers (Maybe it’s different for Nikon and Canon – I don’t have the files to check). I’m sure a basic photo gallery was there but  Movie Maker has gone, but there is a link to download Live Photo Gallery (which disables the built in one instead of having two) and the new “Windows Live Movie Maker”.

    Live Movie maker sports the new, Office 2007 style, “fluent” tool bar as do Wordpad and Paint. Actually that’s a sign of something else. When Windows 95 came out 800x600 was considered high resolution. We couldn’t spare the space at the top of the screen for the bigger toolbars, and the task bar was skinny.  7 has a fatter task bar and handles “stacked” items much better than vista does. There are also a bunch of improvements in Window management, previews and so on. Viral was making very positive noises about these innovations on Friday. My take is that in Vista we took advantage of the capabilities of modern graphics cards  for the first time, it’s very rare that you exploit a technology to best effect at the first go. Peeking- bringing a window to front when you hover over its preview , and putting it back if you move the mouse away - is the kind of thing that comes in a second release. We’ve also got the ability to peek at your desktop without minimizing everything , useful if you use the new sticky notes app. The new sidebar metaphor is not to have a bar on the side – gadgets still start life there but now they can go anywhere on the desktop. Finding something when there are many windows on top of each other is now much easier. And I’m sold on a feature called “jump lists” – basically your recent or common actions show up on the right click menu for a toolbar item – or a fly out menu from the start menu. So for example IE’s history, or “Watch Live TV” for Media Center, so two clicks gets me where I want to be straight away.

    Elsewhere, software explorer seems to have gone from defender, (shame), and there progress indicator hasn’t been put back into defrag. Calculator has had an update – including a useful unit conversion tool, which I hope can be customized.  PowerShell V2 is installed as standard.  The Most annoying change from XP to Vista (to my mind)– the inability to drag files from explorer to a command prompt- has been reversed , you can drag into PowerShell too. And the most annoying change (to everyone else it seems), User Account Control , is more configurable, and a lot less intrusive. I’m guessing its using digital signatures to decide if something can be elevated without prompting.

    Next job(s) try installing the usual raft of software (to date I’ve only got Live writer, gallery and movie maker + Community clips) and plugging in every bit of hardware I’ve got and seeing where I get to .

     

    Technorati Tags: ,,,,
  • James O'Neill's blog

    A Windows 7 Evening with Mark Russinovich

    • 2 Comments

    I’ve mentioned Tom Lehrer before and one of his albums is entitled “An evening wasted with Tom Lehrer” which is often how I think of my own presentations. I got a mail about an evening event (7PM UK time) which is happening in February, given it is Mark Russinovich presnting it should be anything but wasted , despite the rather Buzz Lightyear title of  Windows 7: To the Beta and Beyond

    It’s presented as part of the “Virtual Roundtable” in our Springboard Series

    Date: Thursday, February 12th

    Time: 11:00am Pacific Time , 7:00PM GMT

    https://ms.istreamplanet.com/springboard

    Here’s the blurb about it

    Join Mark Russinovich and a panel of subject matter experts for a live discussion of what's in store for IT pros with Windows® 7. Learn about the evolution of features like Group Policy, BitLocker™ To Go, DirectAccess, BranchCache™, and Software Restriction then get tips on troubleshooting, deployment, and application compatibility. Bring your questions—Mark and the panel will answer as many as they can during the hour-long event, then publish the rest in a Q&A after the event.

    Find answers to your Windows client OS deployment and management questions with resources, tools, monthly feature articles, and guidance from subject matter experts and early adopters. To learn more, visit www.microsoft.com/springboard.

    As part of the “virtual” experience, you may submit your questions about Windows 7 Beta to the panel live during the event—or submit questions in advance to vrtable@microsoft.com.

  • James O'Neill's blog

    Fun and games with VHD files in the new OSes

    • 2 Comments

    image One of the new features for both Windows Server 2008 R2 and the Windows 7 client is support for Virtual Hard Disk files built into the OS. You can create fixed or dynamic disks and “attach” the tools for Hyper-V call this “mounting” a VHD and early stuff on 7 seems to  have called it surfacing a VHD . You need to click the image on the left to see it full size but  Disk 3 has a different coloured disk icon, and it contains the full image backup of my Vista hard disk.

    Disk part will do the job too. 

    Create VDISK will setup a new VHD (Help Create Vdisk will tell you the parameters)

    Select VDISK "<file name">” followed by “Attach” Vdisk  will bring a disk on-line.

    Then you can partition it like any other disk, use it like any other disk and so on.

     

    Now … during installation you can press [Shift][F10] to pop up a command prompt, and if the installation runs on the 6.1 build of Windows PE what do you think you might be able to do  ?

  • James O'Neill's blog

    Hyper-V Server R2 Beta.

    • 0 Comments

    Nice as Windows 7 client is, I’ve found myself feeling a more excited about Windows Server 2008 R2. Having banged on and on about how easy it is to set-up a cluster with Hyper-V on the original Server 2008, it turns out to be even easier. I’m trying to finish my Hyper-V library for PowerShell and the first few tests I’ve done show that everything coded for the original release works with R2. It’s one extra line in the PowerShell script to make a machine highly available (or two if you have to set up the cluster shared volume). And live migration just works. Actually I’ve got half a mind to suggest a change to the product team which is when the migration completes the management tool should play a fanfare. There should be more drama, more sense of achievement, but getting on with it in a low key way is Hyper-V’s style.

    Which brings me to Hyper-V server R2 beta. I saw an e-mail saying we’d put out the beta out, but it’s been very low key. There is an overview document which you can download, and here are the major comparison points

    Capabilities

    Microsoft Hyper-V
    Server 2008

    Microsoft Hyper-V
    Server 2008 R2

     

    Number of Sockets licensed

    Up to 4

    Up to 8

     

    Number of cores supported

    24 (with QFE)

    32

     

    Maximum Memory

    32 GB

    1 TB

     

    VM Migration

    None

    Quick and live migration

     

    Manageable by SCVMM

    Yes (SCVMM 2008)

    Yes (SCVMM 2008 SP1)

     

    Maximum running VM Guests supported

    192,

    256

     

    You can see that R2 has feature parity with Enterprise editions of Windows Server, rather than Standard. That means 8 sockets and 1TB of memory, and clustering (with live migration, but no fanfare). In R2 we’re increasing the core count to 32 (either 8 x 4 Core chips or 4 x 8 core chips when they arrive) and the usual rule of maximum virtual processors = 8 x cores allows up to 256 uni-processor VMs on a 32 core machine

    This document is the first place I’ve seen us say that there will be a service pack for SCVMM and R2 will need it. If our licensing remains unchanged you’ll be able to run VMs on Hyper-V server without needing a Windows CAL you won’t get any licences for instances of the server OS – but you’ll be able to assign a Windows Server Licence to the box and run something else as the virtualization layer. Yes, licensing creates daft anomalies but often fixing them is worse.

    The beta itself is available for download here … I wonder if it supports boot from VHD like Windows Server 2008 R2 – that’s my preferred way to support multi booting and there’s only one way to find out.

    Update. The installation seems to use the 6.0 version of Windows PE, which won’t mount a VHD to install it. I’ve got another post open about that.

  • James O'Neill's blog

    Camera-phones One Note and OCR.

    • 0 Comments

    Everyone uses different bits of office. There’s a core piece that everyone uses and then we all have our personal 10%. I like the OCR feature of One-Note. For example on the way to the BETT show a few days back I saw an advert on the tube that’s a grander variation on “How do you pronounce Ghoti ?” *

    If GH can stand for P in Hiccough
    If OUGH can stand for 0 in Dough
    If PHTH can stand for T in Phthisis
    If EIGH can stand for A in Neighbour
    If TTE can stand for T in Gazette
    It EAU can stand for 0 in Plateau
    Then the way you spell POTATO is...

    GHOUGHPHTHEIGHTTEEAU

    Isn’t it?

    Only The Times brings you the UK’s first national spelling championship for schools.
    Join in at
    Timesonline.co.uk/spellingbee

    I just grabbed a snap with my phone (the handles for standing passengers make a great camera rest to keep shake down) and when I hooked up to my PC  I dropped the picture into OneNote: One notes does OCR on pictures offers a “copy text” menu option when you right click them. I’m finding myself using this more and more, even for slides with a variety of cameras and even screen grabs of on-line presentations. I’ve noticed than some phones now do recognition of input from business cards via their phones. I wonder how long it will be before the whole thing can be done in the phone without needing the PC to do the OCR part.

     

    * Ghoti is pronounced “Fish” , Gh as in enough, o as in women , and ti as in station

  • James O'Neill's blog

    Live Migration in Hyper-V R2

    • 0 Comments

    There are videos on-line already showing Live-Migration in action and I’m working on one to show how it its set up. In the mean time if you have the beta of server 2008 R2 there is a good guide on TechNet on how to set it up for yourself.

    Of course I particularly like the fact that you can set up a cluster, with one line of PowerShell, And add a clustered VM with a second, and live migrate it with a third.  With clustering in Hyper-V server R2, and PowerShell in it, and in the Core installations of Windows Server AND the remote support in PowerShell V2 I like the direction things are moving in.

  • James O'Neill's blog

    On Geekdom, Windows Live, Twitter and Stephen Fry. Just another weekend post.

    • 5 Comments

    First , a geeky joke which my wife told me after hearing it on BBC Radio 2.

    “I bought a book called 1001 things to do with binary. But when I got it home it only had nine in it”.

    While we’re with all things Geeky, I always thought that proper developers, guys like Mike Ormond, looked down on PowerShell, so it was a pleasant surprise to see he’s blogging about his experiences with it – starting with some stuff I did , he’s using it to link his blog with twitter.
    Staying with twitter – we’re experimenting with projecting interesting stuff from it on the wall in the office. Something I saw on there made me go an have a look at something Long Zheng wrote about Windows 7 (I hope we make changing UAC levels generate a UAC prompt before release). The next post down Long’s blog is about using RSS to populate the pictures on the Windows 7 desk top… that might make another post here when I’ve played a little more, but that post took me one of Jamie Thomson’s , which introduced me to a Windows Live service I was previously aware of named frameIt. Frame it doesn’t store your pictures but it rounds up the stuff you want as a single RSS feed and pushes them down to digital picture frames – or anything else which takes pictures as RSS attachments – like the Windows 7 desktop. I think the digital frame is a great way to share pictures with distant parts of the family and combining a service like frameit with Wireless-equipped frame takes some of the friction out of the process.

    Since I mentioned Windows Live: I’m a bit hacked off with it on a couple of counts. First (and staying with photos), I used to have a couple of Albums in a live space, I didn’t want people to have to sign in to see them . I also have my Skydrive presentations folder linked to on the side of this blog. One system for a work persona and the other for a non-work persona, but recently the folks at live decided to put my spaces folders within 1 click of my presentations folder. I need to use different accounts (or services) to keep a gap between them. So I dumped my photo galleries from live spaces. Secondly Skydrive has recently acquired the most annoying and intrusive advertising; I have talked about this whole “Aspergers-Like” issue I have with flash-based Look-at-me Look-at-me animations on web pages: I just can’t focus on the rest of the page with that going on. On Friday, Live was trying to sell me some diet product or other with “before” and “after” shots of a woman in her underwear. I don’t have a problem with pictures of women in their underwear per-se , indeed I think Horst’s Mainbocher Corset is as good a piece of art photography as I’ve seen. These, by contrast, are artless. I don’t want to explain why there is a partially dressed person on my screen at work but it’s the constant hopping from one picture to the other which is the real nuisance.  I’m actually a bit ashamed that Microsoft run such ads on our sites. Normally IE7 pro filters out this kind of junk, but Live uses a twisted combination of files which defeats the filter. IE 8 helped me find the .JS file which perpetrates this ad-crime, and I put that site on “Restricted” (i.e. run no scripts) list. Sorted.

    This inability to shut out noise is one of the things which has kept me off Twitter (that and  “how can you develop an idea in 140 characters ?”). I’ve never quite got past Stephen Fry’s initial impression of it as “the weirdest and naffest idea I’d ever come across”. As he puts it “A lot of that is pretty banal and commonplace it’s easy to mock”. Indeed. But Eileen and others have been telling me that with some of the twitter clients out there now, and using some of the methods people have for working with it I might be able to cope, so I might experiment with it in the near future. (I might have a use for that PowerShell script of Mike’s)  Hang it all, Fry has interesting ideas to develop, and yet finds a use for something where you have to live in 140 characters, and copes with having a follower population the size of a decent town (On Thursday he said on his blog that he had 80,000 of them, today his twitter page reports over 94,000) so there’s no way he is reading every last “banal and commonplace” thought they have. 

    Stephen Fry’s explanation of his conversion to twitter is more interesting than most reasons given for people use it; and he was talking about it on Jonathan Ross’s TV show recently and apparently Tweeting during it. ( Ross is another user by the way) Fry described the first show of Ross’s new series as his return form the “naughty step”. Ross is supposedly the highest paid personality on British TV, and his suspension following the phone calls he made on BBC Radio 2 must make those some of the most expensive calls in history.

    Talking of Radio 2 ….that’s where we came in.

  • James O'Neill's blog

    New build of my PowerShell library for Hyper-V on codeplex

    • 0 Comments

    Some naked statistics

    1942 – the number of lines of code in HyperV.PS1

    499 – the number of lines of formatting XML

    14,381 – the number of words in the documentation file

    2443 - the number of downloads of the last version

    929 – the number of downloads for the versions before that

    1.00 – the version number of the Library now on codeplex.

     

    I’m calling this “released”. I daresay I will need to come back and do a service pack later, and the documentation must be regarded as “preliminary” but it’s done.

     

    Update. A new stat. 200 - the number of downloads so far. Crumbs, that's only a day and half.

Page 1 of 2 (25 items) 12

January, 2009