IT Jack of All Trades

Moving to Blogger
For those people reading my blog, I'm moving to blogger.  Below is my new blog address:
 
http://itjackofalltrades.blogspot.com/
Learning Snaxx: Covering Index using Included Columns

This video will show how to use included columns in a non-clustered index in optimizing a query.

MCP Virtual Business Cards

Demonstrate your technology expertise and skills while expressing your virtual personality by creating your own, unique virtual business card and profile page to highlight your Microsoft certifications.

https://www.mcpvirtualbusinesscard.com/

Microsoft Secondshot is back!

This will now replace the discount vouchers that I’m issuing:

To request a voucher send the following info to vmaceda@hotmail.com:

Number of Vouchers:

Country to Take the Exam

Cape Palliser, New Zealand
Martinborough, New Zealand
Stonehenge Aotearoa
Wellington Zoo December 2009
Weta Cave
Car Exibit 2009
Easter 2009
Backup My Locations in Garmin Mobile XT
There's a time that you want to backup the My Locations in Garmin Mobile XT because you want to hard reset your WinMo phone or install a new ROM.  Unfortunately, Garmin Mobile XT does not have the feature to export the contents of My Locations.  Below are simple steps on how to backup My Locations folder in Garmin Mobile XT:
 
  1. In the root folder our of your device backup the Garmin folder
  2. Also backup the same folder found in the root of your storage card
  3. Once everything has been ok after the restore of your WinMo phone, copy the two folders to their original folder
  4. Copy Storage Card\Garmin\Apps\WM\QuePPC and paste it as a shortcut in My Device\Windows\Start Menu\Programs
Fix GPS lag for HTC Touch Diamond 2
For Builtin GPS:
A. With Advanced config 3.2
1.disable A-GPS
2.disable GPS logging
3.logfile name must be empty
4.old logfile name must be empty
5.maximum size of logfile must be 0
6.delete the files :
\windows\GPSLogFile.txt and \windows\GPSLogFileBack.txt
With those changes car usage will be quite perfect
 
B. Then edit registry with TotalCommander
Under: HKLM\SYSTEM\CurrentControlSet\GPS Intermediate Driver\
•Drivers\GpsOneDevice\PollInterval -> 100 (default is 1000)
•Drivers\InputBufferSize -> 512 (default is 4096)
•Drivers\OutputBufferSize -> 512 (default is 4096)
•Drivers\SleepOnNoData -> 100 (default is 1000)
•Multiplexer\MaxBufferSize -> 512 (by default not present, you have to create it)
With those tweaks pedestrian usage will be much better but not perfect.
Tools that you need to do this:
- Registry Editor such as total commander
- Advanced Configuration Tool 3.3
- .NET Compact Framework 3.5

For Bluetooth External GPS:
- Download GPSGate 2.6
- Run GPS Gate and select the Wizard Button
- Make Sure that Wireless Bluetooth GPS is ticked
- Click on Next Button (>)
- It will search for you Bluetooth GPS, once found click on yes
- Make sure that Share with NMEA Applications is only ticked
- In Windows Mobile Go to System Settings->External GPS
- Under Programs tab, make sure that GPS Program Port is set to None
- Under Hardware tab, make sure that GPS Hardware Port is set to none
- Under Access tab, make sure that Manage GPS Automatically is set
 
Now to Test It:
- Fire Garmin Mobile XT
- Go to Tools (wrench icon)
- Settings->System->Remote GPS
- If you're using internal GPS, select Use GPS Intermediate Driver
- If you're using external bluetooth gps, select COM1: Franson COM1

**NOTE:
This was tested using the following:
- HTC Touch Diamond 2 with Stock ROM WM 6.5
- QStarz BT-818x
- Garmin Mobile XT
 
You must also close GPS Gate and turn-off bluetooth once you're done using it
to conserve battery life.
Powershell Script to Backup VMs in Hyper-V: A Poor Man's Alternative to DPM
The script below was taken from the blog: http://mindre.net/post/Powershell-script-for-snapshot-and-exporting(backup)-Virtual-Machines.aspx .  I've tweaked it a bit by adding error handling, making sure that the restoring of the VM state is done prior to processing the next VM and writing the results in the event log:
 
##
## Create a backup of all the vm's
##
$dest = "F:\Backup"
$VM_Service = get-wmiobject -namespace root\virtualization Msvm_VirtualSystemManagementService
$ListofVMs = get-wmiobject -namespace root\virtualization Msvm_ComputerSystem -filter  "ElementName <> Name"  

[system.diagnostics.eventlog]::WriteEntry("VM Backup","Back-up Process Started",[system.diagnostics.eventlogentrytype]::Information)
foreach ($VM in [array] $ListOfVMs)
{
 $VMReturnState = $VM.EnabledState
 $VMName = $VM.ElementName
 
 try
 {
  if (($VM.EnabledState -eq 2) -or ($VM.EnabledState -eq 32768) -or ($VM.EnabledState -eq 32770))
  {
   $VM.RequestStateChange(32769)
   echo "Saving the state of $VMName"
  }
 
  while (!($VM.EnabledState -eq 32769) -and !($VM.EnabledState -eq 3))
  {
   Start-Sleep(1)
   $VM = get-wmiobject -namespace root\virtualization -Query "Select * From Msvm_ComputerSystem Where ElementName='$VMName'"
  }
 
 
  if ([IO.Directory]::Exists("$dest\TmpDir\$VMName"))
  {
   [IO.Directory]::Delete("$dest\TmpDir\$VMName", $True)
  }
 
  echo "Exporting the VM"
  $status = $VM_Service.ExportVirtualSystem($VM.__PATH, $True, "$dest\TmpDir")
   
  if ($status.ReturnValue -eq 4096)
  {
   $job = [Wmi]$status.Job 
  
   while (!($job.PercentComplete -eq 100) -and ($job.ErrorCode -eq 0))
   {
    Start-Sleep(5)
    $job = [Wmi]$status.Job 
    echo $job.PercentComplete
   }
  }
 
 
  ## Store the files on in a temp directory before moving them to their location and then remove the old files.
 
  if ([IO.Directory]::Exists("$dest\$VMName"))
  {
   [IO.Directory]::Move("$dest\$VMName", "$dest\$VMName-OldTmpDir")
   [IO.Directory]::Move("$dest\TmpDir\$VMName", "$dest\$VMName")
   [IO.Directory]::Delete("$dest\$VMName-OldTmpDir", $True)
  }
  else
  {
   [IO.Directory]::Move("$dest\TmpDir\$VMName", "$dest\$VMName")
  }
  
  $VM.RequestStateChange($VMReturnState)
  
  while (!($VM.EnabledState -eq $VMReturnState))
  {
   Start-Sleep(1)
   $VM = get-wmiobject -namespace root\virtualization -Query "Select * From Msvm_ComputerSystem Where ElementName='$VMName'"
  }
  echo "Done with $VMName"
  [system.diagnostics.eventlog]::WriteEntry("VM Backup","Back-up Virtual Machine $VMName complete",[system.diagnostics.eventlogentrytype]::Information)
  
  
 }catch [SystemException] {
  echo "Error backing-up $VMName"
  [system.diagnostics.eventlog]::WriteEntry("VM Backup","Error backing-up virtual machine: $VMName",[system.diagnostics.eventlogentrytype]::Error)
 }
}
[system.diagnostics.eventlog]::WriteEntry("VM Backup","Back-up Process Complete",[system.diagnostics.eventlogentrytype]::Information)
 
You can use notepad or PowerGui to modify PowerShell Scripts
 

 
 
 
iisapp equivalent in IIS7
Most of you will have used the useful iisapp script on IIS6 to find out which w3wp worker process relates to which Application Pool.  In IIS7, this script doesn’t work anymore.  There is a replacement though. You can add the command below to a batch file and just call it:
 
%windir%\system32\inetsrv\appcmd.exe list wp
More Posts Next page »