PowerShell 3.0 for Windows 7 and Server 2008

Along with the launch of Windows Server 2012* yesterday, Microsoft released the Windows Management Framework 3.0 for some downlevel clients. In the package you get PowerShell 3.0, and updated versions of WMI and WinRM for Windows 7 SP1, Windows Server 2008 R2 SP1 and Windows Server 2008 SP2. If you were looking for support on XP and Vista you are out of luck.

WMF 3.0 also contains the Server Manager CIM Provider that you’re going to need on your 2008 R2 SP1 and 2008 SP2 servers if you want to manage them with the new Server Manager in Windows Server 2012 or Remote Server Admin Tools for Windows 8 (RSAT for Win8 is yet to reach RTM).

Download WMF 3.0 at http://www.microsoft.com/en-us/download/details.aspx?id=34595

* Make sure you click that link to the online launch event; windows-server-launch.com has a load of learning resources for Microsoft’s amazing new Server release, especially around management and virtualisation.

Share an Internet connection and turn a Windows 7 or 8 PC in to a Wireless Hotspot (even on a VPN)!

I recently needed to connect my phone to a wireless network and the only connectivity available was a wired VPN on my notebook. It turns out that in Windows 7 and Windows 8 it is possible to turn a wireless enabled machine into a hotspot that any device can use!


1) Run an elevated command prompt (Right Click > Run as administrator) and run the command:

netsh wlan set hostednetwork mode=allow ssid=<networkname> key=<password>

Where  <networkname> is your choice of name for your Hotspot and <password>is a strong secure password.

For example

netsh wlan set hostednetwork mode=allow ssid="James WiFi" key="G0dBl3ssTheIntern3t"

2) This will create a connection called ‘Wireless Network Connection 2’ which is a Microsoft Virtual WiFi miniport adapter. Rename the connection as ‘Wifi Hotspot’

3) Browse to the properties of the adapter and uncheck all of the options apart from Internet Protocol Version 4 (TCP/IPv4)

4) Browse to the properties of the Internet connected adapter or VPN connection and select the sharing tab. Tick the first box as below and select Wifi Hotspot as the Home n.

5) Create a shortcut on the Desktop called ‘Start WiFi Hotspot. This will let you switch on the hotspot on without having to type the commands. In the location box type:

netsh wlan start hostednetwork

6) Create another shortcut on the Desktop called ‘Stop WiFi Hotspot. This will let you switch off the hotspot on without having to type the commands. In the location box type:

 netsh wlan stop hostednetwork

7) Note: The shortcuts must be run as an Administrator (Right Click > Run as administrator)

8) And that’s it! You should now be able to connect to your hotspot and use the internet wit other wireless enabled devices such as your Phone, Console or other laptops

To remove the settings run the command below and do change the WiFi Hotspot name or password just run the first command again with the new details.

netsh wlan set hostednetwork mode=disallow ssid=<networkname> key=<password>

Windows 7 now the most used OS on campus

It’s been a while since I did these stats, and I don’t think I’ve ever blogged them before, but I was prompted to check this after hearing Microsoft say that Windows 7 has overtaken previous versions worldwide.

It turns out that even though there hasn’t been any particular institutional drive towards Windows 7, thanks to the efforts of pro-active staff across the University, it does now significantly outnumber all other operating systems in our Active Directory combined! In the last 3 months, the breakdown of computers is…

Windows 7: 7155
Everything else: 5385

There are an unknown number of machines that aren’t connected to Active Directory, but the spread of those won’t affect this a great deal.

Another interesting stat that I heard recently came from Dell. They now predict that 50% of all server workloads are virtualised. Thats probably about true here – I’ll see if I can get those stats later.

Incidentally, the breakdown of Windows servers in our AD sees roughly equal numbers of Server 2008 R2 and Server 2003 (just over 200 of each), and just over a hundred running Server 2008.

If anyone is interested in grabbing these stats in their own organisation (or OU), then it’s just a simple bit of PowerShell using the Quest AD cmdlets

$computerObjects = Get-QADComputer `
-IncludedProperties pwdLastSet -SizeLimit 0
$recentComputers = $computerObjects | `
Where {$_.pwdLastSet -ge ((Get-Date).AddDays(-90))}
$recentComputers | Group OSName | `
Sort Count -Desc | Format-Table Count,Name -AutoSize

(That’s just 3 lines of code, but it could be fewer. The ` character extends the line in PowerShell)

Shift & Right Click!

Thought I would blog on something that I only learnt last year but has been a great time saver for me.

Holding down ‘Shift’ when right clicking in explorer gives some extra very handy options including ‘Open a Command Window here’ and ‘Copy as Path.’

Also, several files types have other contact sensitive options for instance Office files can ‘Open as read only’.


Mouse and keyboard not detected by Windows 7 setup

We recently got a batch of new workstations on campus that are using USB3 for half of the supplied USB ports. We had some problems during the WDS setup of these as there is no native support for USB3 in WinPE 3.0 as supplied with Windows 7 Service Pack 1, and of course our WDS boot menus use WinPE 3.0.

After hitting F12 to initiate the WDS setup WinPE happily loaded but obviously offered no mouse or keyboard support when using the USB3 ports. Okay, you could swap mouse and keyboard to USB2 and this would immediately resolve the issue. However, best to get the USB3 drivers into PE. I did this using the driver injection method as blogged about previously: WDS How To – deploy drivers See the section titled: “Boot image driver injection has become very easy!” (WDS dynamic driver management is excellent, I may have mentioned that before… )

For those of you who don’t know, USB3 ports are coloured blue on the inside, so you can easily spot them if they’re there:

usb3 image

Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1)

Since the release of Windows 7 SP1, people who installed the Service Pack before installing the RSAT package weren’t able to do so (although if you installed RSAT before SP1 you were fine).

Microsoft have resolved this with the release of Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1): http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d

Workaround for the: “The network folder specified is currently mapped using a different user name and password” error

Some people make use of the “Connect using different credentials feature” when working with different permissions is required:

It seems that this can sometimes result in the error message “The network folder specified is currently mapped using a different user name and password” error message.” The message can occur even when this is not the case!

Microsoft state that this behaviour is by design and provide a workaround.

“Use the IP address of the remote server when you try to connect to the network share”

This does seem to work but requires that you know the name of the IP of the server you are connecting to. This can easily be found out using the command:

Ping servername

Fix the Windows Explorer Navigation pane in Windows 7

This may not be news to many but I’ve only just found this out so thought I would share on the Blog. For some reason I cannot fathom Microsoft decided to change the behaviour of Windows Explorer in Windows 7 to not expand folders in the Navigation pane.

The way I work means this is massive pain for me so I was happy when I found out how to fix this:

In folder options you can check “Show all folders” and “Automatically expand to current folder”

Problem Solved!