Advertisement Header

Tuesday, 23 November 2010

How to use ADPlus to troubleshoot "hangs" and "crashes"

ADPlus is a tool from Microsoft Product Support Services (PSS) that can troubleshoot any process or application that stops responding (hangs) or fails (crashes). Frequently, you can use ADPlus (ADPlus.vbs) as a replacement tool for the Microsoft Internet Information Server (IIS) Exception Monitor (6.1/7.1) and User Mode Process Dump. These are two separate tools that PSS frequently uses to isolate what causes a process to stop responding (hang) or quit unexpectedly (crash) in a Microsoft Windows DNA environment.

Click Here to Download ADPlus

Wednesday, 3 November 2010

Send-SMTPmail Using Powercli

Below function should be include in the script:
function Send-SMTPmail($to, $from, $subject, $smtpserver, $body, $attachment) {
$mailer = new-object Net.Mail.SMTPclient($smtpserver)
$msg = new-object Net.Mail.MailMessage($from,$to,$subject,$body)
$msg.IsBodyHTML = $true
$attachment = new-object Net.Mail.Attachment($attachment)
$msg.attachments.add($attachment)
$mailer.send($msg)
}

Command which need to use in the script after function declaration
send-SMTPmail $EmailTo $EmailFrom “$VISRV vCheck Report” $SMTPSRV -body “$VISRV vCheck Report” -attachment “$Filename”

Tuesday, 17 August 2010

Howto: Rename a VM

There are a couple of ways to rename a Virtual Machine, but there are two in my opinion that stand out:
  1. Shutdown the VM
  2. Rename the VM in VirtualCenter
  3. Migrate the VM and move it to another Datastore
  4. done!
And from the service console:
  1. vmware-cmd -s unregister /vmfs/volumes/datastore/vm/vmold.vmx
  2. mv /vmfs/volumes/datastore/vm-old /vmfs/volumes/datastore/vm-new
  3. cd /vmfs/volumes/datastore/vm-new
  4. vmkfstools -E vm-old.vmdk vm-new.vmdk
  5. find . -name ‘*.vmx*’ -print -exec sed -e ‘s/vm-old/vm-new/g’ {} \;
  6. mv vm-old.vmx vm-new.vmx
    for every file that hasn’t been renamed (.vmsd etc.)
  7. vmware-cmd -s register /vmfs/volumes/datastore/vm-new/vm-new.vmx
  8. done!