File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -882,14 +882,27 @@ $OSChoicesCount = "2"
882882
883883 Write-Host
884884 [int ]$ans = Read-Host ' Choose an OS (numerical value)'
885+
886+ if ($ans -ne 1 -or $ans -ne 2 ){
887+
888+ Write-host " Invalid value enterered..." - ForegroundColor Red
889+ Write-Host
890+ break
891+
892+ }
893+
894+ =======
895+
885896 $selection = $menu.Item ($ans )
886897 Write-Host
887898
888899 if ($selection ){
889900
890- $OS = $OSChoices | ? { $_ -eq " $Selection " }
901+
902+ $OS = $OSChoices | ? { $_ -eq " $Selection " }
903+
904+ }
891905
892- }
893906
894907# endregion
895908
@@ -1454,6 +1467,4 @@ else {
14541467Write-Host " Evaluation complete..." - ForegroundColor Green
14551468Write-Host
14561469write-host " -------------------------------------------------------------------"
1457- Write-Host
1458-
1459-
1470+ Write-Host
You can’t perform that action at this time.
0 commit comments