If you don’t know which physical server is hosting a particular virtual machine. A simple way to find it out is to remote login into the VM guest and check the following registry key. [HKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters]"HostName"="PhysicalHostName"="PhysicalHostNameFullyQualified"="VirtualMachineName"=
PowerShell: Hyper-V VM Inventory
Having a clean inventory of all virtual machines is a good practice to avoid virtual machine sprawl. I created a script to send me to the Monthly VM Inventory automatically, this includes the Guest name, status, OS, vCPU, RAM, host and notes. The results look like this: JC-VM-01STATUS: RunningVCPU: 1RAM: 2048 MOS: Windows Server 2008 … Continue reading PowerShell: Hyper-V VM Inventory
Backup Exec 2010 Best Practices
TECH77887 Symantec Backup Exec (TM) 2010 Administrator's Guide (English) TECH77928 Symantec Backup Exec (TM) 2010 Readme First Release Notes (English) TECH77956 Symantec Backup Exec (tm) 2010 General Information TECH164267 Backup-to-Disk Best Practices HOWTO21767 Best practices for Backup Exec 2010 R3 Deduplication Option HOWTO59043 Best practices for using Backup Exec 2010 R3 Deduplication Option with the … Continue reading Backup Exec 2010 Best Practices
PowerShell: Monitor Hyper-V VM Heartbeat
$hostname = “ServerName” $service = gwmi -class "Msvm_VirtualSystemManagementService" -namespace "root\virtualization" -ComputerName $hostname $VM = gwmi -ComputerName $hostname -namespace "root\virtualization" -query "Select * from Msvm_ComputerSystem where Caption='Virtual Machine'" Foreach ($_ in $VM) { Write-Host $_.ElementName $settings = gwmi -ComputerName $hostname -namespace "root\virtualization" -query ("ASSOCIATORS OF {" + $_.__PATH + "} WHERE resultClass = Msvm_VirtualSystemsettingData") $HB = … Continue reading PowerShell: Monitor Hyper-V VM Heartbeat
PowerShell: Send Email
I scheduled a task to send me the every day report by Email. Here is how I did by using PowerShell: $emailFrom = Monitor@test.com$emailTo = jackie.chen@test.com $subject = "Everyday Report"$body = Get-Content C:\Logs\EverydayReport.txt $smtpServer = "SMTP.test.com"$smtp = new-object Net.Mail.SmtpClient($smtpServer)$smtp.Send($emailFrom, $emailTo, $subject, $body)