Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ########ESX Embedded or installed
- $array= @()
- foreach($esx in Get-VMHost){
- $esxcli = Get-EsxCli -VMHost $esx
- $bootDev = $esxcli.system.boot.device.get()
- if($bootDev.BootFilesystemUUID){
- if($bootDev.BootFilesystemUUID[6] -eq 'e'){
- $obj = [pscustomobject]@{
- Host = $esx.Name
- Install = "Embedded"
- }
- }
- else{
- $mountPoint = $esxcli.storage.filesystem.list() | where{$_.UUID -eq $bootDEV.BootFilesystemUUID} |
- select -ExpandProperty MountPoint
- $obj = [pscustomobject]@{
- Host = $esx.Name
- Install = "Boot from device $($mountPoint)"
- }
- }
- }
- else{
- if($bootDev.StatelessBootNIC){
- $obj = [pscustomobject]@{
- Host = $esx.Name
- Install = "Stateless, PXE boot from $(bootDev.StatelessBootNIC)"
- }
- }
- else{
- $obj = [pscustomobject]@{
- Host = $esx.Name
- Install = "PXE Boot from $($bootDev.BootNIC)"
- }
- }
- }
- $array+=$obj
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement