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. <#.SYNOPSISThis script will provide the architure (physical of virtual) of a host..DESCRIPTIONThis script will provide the architure (physical of virtual) of a host..EXAMPLEsysteminfo /s $HOSTNAME | findstr /c:”Model:” /c:”Host Name”.AUTHORWritten by…


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…


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…


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…


Microsoft Windows PowerShell – Query Users on Remote Server

You may use the following Microsoft Windows PowerShell script to query a remote server and display any logged on users. <# .SYNOPSIS This script will query a remote server and display user session information. .DESCRIPTION This script will query a remote server and display user session information. .EXAMPLE N/A. .AUTHOR Written by Noel Enrique Alvarez…


Microsoft Windows PowerShell – Reboot Multiple Servers

You may use the following Microsoft Windows PowerShell script to reboot multiple Microsoft Windows hosts on a network. <# .SYNOPSIS This script will query a list of hostnames then reboot each server. .DESCRIPTION This script will query a list of hostnames then reboot each server. .EXAMPLE Restart-Computer $SERVER .AUTHOR Written by Noel Enrique Alvarez on…


Microsoft Active Directory – Get Computer Object Organizational Unit

You may use the following Windows PowerShell cmdlet to query Microsoft Active Directory (AD) for the hostname and organizational unit (OU) of a computer object. Get-ADComputer -Filter ‘Name -EQ “HOSTNAME“‘ | Format-List -Property Name, DistinguishedName


Hardware – View Architecture of Host

You may use the following command from the command prompt or Windows PowerShell to view the architecture, physical or virtual, of the local or remote host on a network. In the second command substitute the %computername% variable with the hostname of the host to be queried. systeminfo | findstr /c:”Model:” /c:”Host Name” systeminfo /s %computername%…