Skip to content

Commit cc1abfc

Browse files
authored
Merge pull request #81 from IonutDanNica/patch-1
Update ESXiBootDevice.ps1 to return stateless boot correctly
2 parents ba762fe + 23c208e commit cc1abfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

powershell/ESXiBootDevice.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
$option.option = "/UserVars/ImageCachedSystem"
5151
try {
5252
$optionValue = $esxcli.system.settings.advanced.list.Invoke($option)
53+
$bootType = $optionValue.StringValue
5354
} catch {
5455
$bootType = "stateless"
5556
}
56-
$bootType = $optionValue.StringValue
5757
}
5858

5959
# Loop through all storage devices to identify boot device
@@ -105,4 +105,4 @@
105105
$results+=$tmp
106106
}
107107
$results | FT -AutoSize
108-
}
108+
}

0 commit comments

Comments
 (0)