Thursday, March 01, 2012

Windows 8 Consumer Preview released!

This is the new face of Windows: Windows 8 and Metro GUI. Download (and install!) Windows 8 from http://windows.microsoft.com/en-US/windows-8/download



This is an screen shot of Build 8250. Pretty amazing!

Wednesday, February 22, 2012

MS: Determine which version of Office installed

How to determine which version of an Office 2010 product is installed
http://support.microsoft.com/kb/2121559

How to determine which version of a 2007 Office product is installed
http://support.microsoft.com/kb/928116

How to check the version of Office 2003 products
http://support.microsoft.com/kb/821549

How to check the version of Office XP
http://support.microsoft.com/kb/291331

How to determine the version of your Office 2000 program
http://support.microsoft.com/kb/255275

Monday, February 13, 2012

MS: Hyper-v R2 VM failed to start - Unable to allocate Ram: insufficient system resources - Error 0x800705AA

The Problem:

I have been running lot of VMs on the same Windows 2008 R2 server with Hyper-V role installed since November 2010. I updated server to SP1 a long time ago and keep server updated. No antivirus installed, because this is standalone training server. No Active Directory. Intel Core i7 with 6GB RAM.

On Thursday, I tried to start 4 VMs (usuallyI ran 5 to 7 simultaneous VMs) and when I tried VM #3 I got the following error:

MachineName failed to start
Unable to allocate xxx MB of Ram: insufficient system resources exist to complete the request service (0x800705AA)




So I spent last 4 days going through different tests:
  • Remove video card driver.
  • Disabled all software running on the server (this software was running before)
  • Uninstall all software I can.
  • Check online for similar issues.
  • Modified the cached physical memory reservation (using the registry key), to increase free physical memory.
  • Change memory assignment on VM to dynamic.
  • Applied few hotfixes (KB983289 and KB979149)
  • Check the event viewer for more info
  • Verify I have enough space on all disk partitions
  • Reinstall Hyper-V

Usually I ran for VMs ( 2 x 512MB of RAM + 2 x 768 RAM) and again I was doing this since November 2010.As you can see below there are plenty of memory available.


Solution:

After 4 days and running out of ideas I posted this issue on the Hyper-V forum and minutes later, Bob Comer a Microsoft MVP Virtual Machine posted that issue was caused by a Google application called GooglecrashHandler.exe

* Open Task Manager and found two process called GooglecrashHandler, killed them and using Autoruns I found they in Task Scheduler. Remove all entries.

* Delete directory D:\Program Files (x86)\Google\Update

* Delete the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\gupdate registry key

* Delete the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\gupdatem registry key

After that I was able to start all VMs. Thanks Bob!

Final Questions:

  • So the first question is how a 64k crap process created by Google can cause a problem like this?
  • Why this crap is installed on my system when I never installed any Google application?
  • And why the damn applications is not show in the Add/Remove Programs in Control Panel?
  • Why developers at Google are so BAD creating programs?
  • And finally: this issue was caused because Google developers are really f****** i***** or this is intentional?
  • Why this process is not considered a spyware or virus for antivirus companies?

Thursday, January 26, 2012

MS: Script Get List .NET Framework version for list of computers

One of my colleague in the WIndows Operations team asked me to create a VBscript to get all .NET Framework Version installed on a list of servers (provided in a .txt file). I created the script using blocks so the team can reuse it for multiples tasks.

To use the script: Cscript NetFramework.vbs , where is the text file with a list of servers or machines.


'--- script start here--
On Error Resume Next

Const HKEY_LOCAL_MACHINE = &H80000002
RegistryRoot= HKEY_LOCAL_MACHINE
Dim NetF(10)
Dim Version(10)

NetF(1) = "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322"
Version(1) = "1.1"
NetF(2) = "Software\Microsoft\NET Framework Setup\NDP\v2.0.50727"
Version(2) = "2.0"
NetF(3) = "Software\Microsoft\NET Framework Setup\NDP\v3.0"
Version(3) = "3.0"
NetF(4) = "Software\Microsoft\NET Framework Setup\NDP\v3.5"
Version(4) = "3.5"
NetF(5) = "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client"
Version(5) = "4.0"
NetCount = 5

Set objArgs = WScript.Arguments
if objArgs.Count = 0 then
WScript.Echo "Command line parameters not specified"
WScript.Echo "Usage: Cscript NetFramework.vbs "
WScript.quit
end if
ServerList = trim(objArgs(0))
OutputFile = "NetF-Report.csv"

'Create Header
Header="ServerName"
For I=1 to NetCount
Header=Header & "," & Version(I)
Next

'Record loop for servers
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objInFile = objFSO.OpenTextFile(ServerList, 1)
Info=Header & vbcrlf & CSVLine
Do Until objInFile.AtEndOfStream
strLine = objInFile.ReadLine
strComputer = strLine
wscript.echo "Checking machine " & Ucase(strComputer)
Info = Info & GetServerInfo(strComputer) & vbcrlf & CSVLine
Loop

'delete existing report file
objFSO.DeleteFile(OutputFile)

'create new report file
Set objFile = objFSO.CreateTextFile(OutputFile)
objFile.Write Info
objFile.Close

'*********************
'** Get Server Info **
'*********************
function GetServerInfo(ServerName)
Result=ServerName
if Ping(ServerName)=True then
For I=1 to NetCount
if ReadReg(ServerName, RegistryRoot, NetF(I), "Install")=True then
SPVersion=ReadRegValue(ServerName, RegistryRoot, NetF(I), "SP")
if SPVersion>0 then
Result=Result & ",SP" & SPVersion
else
Result=Result & ",NO SP"
end if
else
Result=Result & ",No"
end if
Next
else
Result = Result & ",N/A"
end if
GetServerInfo = Result
end function

'*******************
'** Read Registry **
'*******************
Function ReadReg(strComputer, RegistryRoot, strKeyPath, strValueName)
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objRegistry.GetDWordValue RegistryRoot,strKeyPath,strValueName,strValue
If IsNull(strValue) Then
ReadReg = False
Else
ReadReg = True
End If
End Function

'*************************
'** Read Registry Value **
'*************************
Function ReadRegValue(strComputer, RegistryRoot, strKeyPath, strValueName)
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objRegistry.GetDWordValue RegistryRoot,strKeyPath,strValueName,strValue
ReadRegValue = strValue
End Function

'******************
'** Ping Machine **
'******************
Function Ping(strHost)
Dim objPing, objRetStatus
Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
("select * from Win32_PingStatus where address = '" & strHost & "'")

for each objRetStatus in objPing
if IsNull(objRetStatus.StatusCode) or objRetStatus.StatusCode<>0 then
Ping = False
else
Ping = True
end if
next
End Function

Thursday, November 03, 2011

VMware: Windows 2008 R2 SP1 memory issues on VMware ESX 3.5

Definitely there is an issue running Windows 2008 R2 Service Pack 1 (SP1) VM on ESX 3.5.

We have several VMs running SQL Server, IIS, SharePoint and Project Servers. After lot of timeout issues, I decided to spend a couple of hours to research where the issue is.

I saw the VM is using almost all memory and only 25MB of free memory is available.

I started disabling all services (IIS, SharePoint, SQL, Antivirus) and rebooted server. Server still using around 3.8 GB of RAM of 4GB.

Rebooted on safe mode, using 380 MB! Rebooted on safe mode with networking around 460 MB!

Then I compared with others servers (1 VM and 1 physical server). Same issue on the VM, but physical server was using around 800MB of RAM.

I decided to uninstall VM Tools and viola! Issue resolved.

Monday, October 17, 2011

How to enable x64 platform optimization on Visual Studio C# 2010 Express

How to enable x64 platform optimization on Visual Studio C# 2010 Express

Today I’m working in access in to HP Blades chassis info from using PowerShell (HewlettPackard.Servers.BladeSystem.HPBladeSystemEnclosureCmdLets) from C#. Sounds complicated and it is. Anyway, I used C#.NET or VB.NET to run PowerShell for VMware, Exchange and Citrix until I got HP and they ruin it.

I read the brilliant HP BladeSystem PowerShell cmdlets post and tried on PowerShell and it failed until I decided to run PowerShell on Run As Administrator (not required for any of previous mentioned snap-ins) and works.

I tried to run the code from Visual Web Developer and after couple of hours decided to move the code to Visual C# console application. Tried and failed again. Nice. I started to thinking a lot in HP. Run as administrator mode and failed too.

Then I started my search and found some people complain about specific snap-ins need to run in 64bits mode.

So now is the part I think a lot on the MS how created the Visual C# Express Edition 2010. I tried to change the platform and I can’t found how to make it and take lot of time to figure out. So below is the solution:



  • On the Tools menu, select Settings and then Expert Settings.

  • On the Tools menu, select Options.

  • Enable the Show all settings checkbox below.

  • Select the Projects and Solutions option (left side) and enable the Show advanced build configurations checkbox.

  • On the Build menu, select Configuration Manager (if you don’t have the Build option, right-click in the toolbar and choose Customize and then the Build option).

  • On the Configuration Manager, choose New from the Active solution platform drop-down. On the new platform select x64 and choose to copy settings from x86.

  • To verify the setting select project properties (Project menu, project name properties), and the on Build tab, verify or set the platform to x64

Monday, August 01, 2011

500 Posts and Giveaway!

This is the historic post #500 and I'm going to celebrate it with a giveaway of 2 copies of my book "Getting Started with Citrix XenApp 6" in eBook format in the 4 next weeks!

Instructions at http://bit.ly/n3pFCA


MS: The WMI Performance Adapter service fill up the System event

Issue:

You found the System Event Viewer full of events related with the WMI Performance Adapter service. The service start and stop every 5 minutes.

Events are:

Log Name: System

Source: Service Control Manager
Event ID: 7036
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Description: The WMI Performance Adapter service entered the stopped state.

and

Log Name: System
Source: Service Control Manager
Event ID: 7036
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Description: The WMI Performance Adapter service entered the running state.


Solution:

Set the WMI Performance Adapter service Startup Mode to Automatic