Category: VMware vCenter Server 6.5

Microsoft Windows PowerShell – Get Host Architecture

You may use the following Microsoft Windows PowerShell script below to get the architecture, physical or virtual, of a Windows host on a network.

<#
.SYNOPSIS
This script will provide the architure (physical of virtual) of a host.
.DESCRIPTION
This script will provide the architure (physical of virtual) of a host.
.EXAMPLE
systeminfo /s $HOSTNAME | findstr /c:”Model:” /c:”Host Name”
.AUTHOR
Written by Noel Enrique Alvarez on Tuesday, April 23, 2019.
#>

#Requst the hostname of the host
$HOSTNAME = Read-Host “What is the hostname of the server?”

#Provide the architure of the host
systeminfo /s $HOSTNAME | findstr /c:”Model:” /c:”Host Name”


Microsoft Windows 10 – False Duplicate IP Address Detected

At my existing employer, it was brought to my attention that a number of VMware virtual machines running the Microsoft Windows 10 operating system were randomly dropping off the network, upon reboot. Viewing the properties of the network adapter confirmed that they were assigned static IP addresses. However, running ipconfig from the command prompt showed that they were assigned 169.254.x.x IP addresses.

Upon reviewing the logs I found the following error message: “The system detected an address conflict for IP address 0.0.0.0 with the system having network hardware address XX-XX-XX-XX-XX-XX. Network operations on this system may be disrupted as a result.” The XX-XX-XX-XX-XX-XX is the MAC address of a Cisco switch.

In summary, the root cause of this is Windows 10 performing an ARP probe at the time as the Cisco switch performing an ARP probe in order to maintain the IP device-tracking cache during IP device tracking. The Windows 10 host believes another node on the network is probing the address it’s assigned and must treat it as an IP address conflict.

The solution is to disable gratuitous ARPs on the switch or in the Windows 10 operating system. We chose to disable the gratuitous ARP in the Windows 10 operating system.

Additionally, more information may be found using the links below.


VMware PowerCLI – Power On a Virtual Machine

You may use the VMware PowerCLI cmdlet below to power on a VMware virtual machine.

Start-VM -VM SERVER


VMware PowerCLI – Create a Snapshot

You may use the following VMware PowerCLI cmdlet to create a snapshot of a virtual machine (VM) in VMware.

New-Snapshot -VM HOSTNAME -Name “<<>>” -Description “<<>>”


VMware PowerCLI – Exit VMware ESXi Host out of Maintenance Mode

You may use the following VMware PowerCLI script to exit a VMware ESXi host out of maintenance mode.

<# .SYNOPSIS This script will exit a VMware ESXi host out of maintenance mode. .DESCRIPTION This script will exit a VMware ESXi host out of maintenance mode. .EXAMPLE Set-VMHost -VMhost HOST.DOMAIN.COM -State Connected. .AUTHOR Written by Noel Enrique Alvarez on Monday, April 15, 2019. #>

#Request the hostname of the VMware ESXi host
$HOSTNAME = Read-Host “What is the hostname of the VMware ESXi host?”

#Exit the VMware ESXi host out of maintenance mode
Set-VMHost -VMhost $HOSTNAME -State Connected

#End of script


VMware PowerCLI – Place VMware ESXi Host in Maintenance Mode

You may use the following VMware PowerCLI script to place a VMware ESXi host in maintenance mode.

<# .SYNOPSIS This script will place a VMware ESXi host in maintenance mode. .DESCRIPTION This script will place a VMware ESXi host in maintenance mode. .EXAMPLE Set-VMHost -VMhost HOST.DOMAIN.COM -State Maintenance. .AUTHOR Written by Noel Enrique Alvarez on Monday, April 15, 2019. #>

#Request the hostname of the VMware ESXi host
$HOSTNAME = Read-Host “What is the hostname of the VMware ESXi host?”

#Place the VMware ESXi host in maintenance mode
Set-VMHost -VMhost $HOSTNAME -State Maintenance

#End of script


VMware PowerCLI – View Snapshots

You may use the following VMware PowerCLI cmdlets to view all of the snapshots managed by vCenter Server or more specifically a cluster. These are sample commands and further information and documentation may be found here.

Get-VM | Get-Snapshot | Format-List
Get-VM | Get-Snapshot | Format-List VM, Name, SizeGB, Created, Description
Get-VM -Location “CLUSTER01” | Get-Snapshot | Format-List
Get-VM -Location “CLUSTER01”| Get-Snapshot | Format-List VM, Name, SizeGB, Created, Description