wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


start

SHIFT-WIKI - Sjoerd Hooft's InFormation Technology

This WIKI is my personal documentation blog. Please enjoy it and feel free to reach out through blue sky if you have a question, remark, improvement or observation. See below for the latest additions, or use the search or tags to browse for content.


Script: PowerCLI: Upgrade to Hardware Level 9

Summary: This script will automatically upgrade VMs from a textfile to hardware level 9. It was based on Script: PowerCLI: Upgrade VMs to New Tools and Hardware Level Version
Date: Around 2013
Refactor: 22 March 2025: Checked links and formatting.

→ Read more...

2025/06/01 11:59

Script: PowerCLI: VMs with RDM disks

Summary: A script to collect RDM disk information from VMs
Date: Around 2013
Refactor: 22 March 2025: Checked links and formatting.

This is a remake of a script found on http://www.virtu-al.net/2008/12/23/list-vms-with-rdm/ with the following changes:

  • Added RDMs in virtualmode
  • Added csv export
  • Added the vmhost in the output
  • Made some code readability changes
#Script Source: http://www.virtu-al.net/2008/12/23/list-vms-with-rdm/
#Connect-VIServer MYVISERVER
 
$timestamp = Get-Date -format "yyyyMMdd-HH.mm"
# $csvFile = Read-Host "Enter csv file"
$csvfile = "D:\sjoerd\$timestamp-rdmvms.csv"
 
$report = @()
$vms = Get-VM | Get-View
foreach($vm in $vms){
  foreach($dev in $vm.Config.Hardware.Device){
    if(($dev.gettype()).Name -eq "VirtualDisk"){
      if(($dev.Backing.CompatibilityMode -eq "physicalMode") -or ($dev.Backing.CompatibilityMode -eq "virtualMode")){
        $row = "" | select VMName, Host, HDDeviceName, HDFileName, Mode
        $row.VMName = $vm.Name
        $getvm = Get-VM $row.VMName
        $row.Host = $getvm.VMHost
        $row.HDDeviceName = $dev.Backing.DeviceName
        $row.HDFileName = $dev.Backing.FileName
        $row.Mode = $dev.Backing.CompatibilityMode
        $report += $row
      }
    }
  }
}
$report | export-csv -NoTypeInformation $csvfile

This wiki has been made possible by:

2025/06/01 11:59

Powershell: Function: Get MD5 Hash

Summary: A function to get the MD5 hash of various items and examples on how to use it
Date: Around 2013
Refactor: 22 March 2025: Checked links and formatting.

→ Read more...

2025/06/01 11:59

Script: PowerCLI: Get Host Network Information

Summary: A script to collect all network information from an ESX host
Date: Around 2013
Refactor: 22 March 2025: Checked links and formatting.

This script will grab all network information from a host including:

  • vmnic configuration
  • vmkernel ports information
  • service console information
  • all virtual switches
  • all port groups

→ Read more...

2025/06/01 11:59

<< Newer entries | Older entries >>

This wiki has been made possible by:

start.txt · Last modified: by sjoerd