#Load required libraries Add-Type -AssemblyName PresentationFramework, PresentationCore, WindowsBase, System.Windows.Forms, System.Drawing #Website: http://vcloud-lab.com #Written By: vJanvi #Date: 20 May 2021 #Tested Environment: #Microsoft Windows 10 #PowerShell Version 5.1 #PowerCLI Version 12.2.0 #Esxi offline bundle ESXi 7.0 #vSphere 7 #Dell drivers for Esxi version 7 #Read xaml file #$xamlFile = 'D:\Projects\PowerShell\WPF\Esxi_patch\Esxi_patch\MainWindow.xaml' $xamlContent = @'