29 June 2012

Script to determine if a server is physical or virtual

Have you ever remotely logged on to a server or PC and wondered if it is physical or virtual?   And if it is virtual is it Hyper-V or VMware.  Sometimes it is easy to tell because of virtual machine extension being installed and leaving a nice little icon in the system try.  But what if it is not obvious?

This little VBscript will return the value of the Manufacturer and the model.

So if it is physical it will give you


VMware machines will give you

Hyperv-V will give you


Here is the script:


On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
For Each objItem in colItems
Val1 = "Vendor: " & objItem.Vendor
Val2 = "  Model: " & objItem.Name
Wscript.echo val1 & Val2Next

27 June 2012

Youtube video fails with "An error has occurred. Try again later"

Since around 22 June 2012 people have been having difficulty loading you tube videos.  Normal access to the Youtube site is working but in the video window you get and error stating "An Error has occurred. Try again later."

If you are Using TMG 2010 with URL filtering enabled you can work around the issue as follows.

Checking the proxy log you should discover that the youtube caching URLs have now been classified as Malicious by the Microsoft Reputation Services.

To work around this issue you can use the URL catgory override to reclassify the Youtube caching URLs to Media sharing.

Use the url pattern  *.c.youtube.com/*

20 June 2012

IPv4 to IPv6 converter for Excel

There are a few scenarios when dealing with unicast ISATAP address when you need to convert between IPv6 and IPv4 addresses

For more infor about this stuff check http://technet.microsoft.com/en-us/library/cc757359(v=ws.10).aspx

This Excel sheet takes some of the conversion hassle out of it.



For the table below use the IP6 Prefix generated by any host on the network as they will be the same.  Then add the IP4 address octets after.




IP6 Prefix
Octet1
Octet2
Octet3
Octet4
2002:a504:b1f:8000:0:5efe:
10
21
35
15
2002:a504:b1f:8000:0:5efe:
0A
15
23
0F
IP6 Address
2002:a504:b1f:8000:0:5efe:0A15:230F

IP6 Prefix
Octet1
Octet2
Octet3
Octet4
=A2
=DEC2HEX(B2,2)
=DEC2HEX(C2,2)
=DEC2HEX(D2,2)
=DEC2HEX(E2,2)
IP6 Address
=CONCATENATE(A3,B3,C3,":",D3,E3)


If you need to go back the other way around you can use the following:



IP6 Address
2002:a504:b1f:8000:0:5efe:0A15:230F
0A15:230F
230F
0A15
0A
15
23
0F
10
21
35
15
IP4
10.21.35.15


IP6 Address
2002:a504:b1f:8000:0:5efe:0A15:230F
=RIGHT(B7,9)
=RIGHT(B7,4)
=LEFT(C8,4)
=LEFT(C8,2)
=RIGHT(C9,2)
=LEFT(E8,2)
=RIGHT(E8,2)
=HEX2DEC(B10)
=HEX2DEC(C10)
=HEX2DEC(D10)
=HEX2DEC(E10)
IP4
=CONCATENATE(B11,".",C11,".",D11,".",E11)


Not very glamorous bit it does the conversions.