Update Invoke-OperatingSystemDiskDetection.ps1

This commit is contained in:
freedbygrace
2023-10-19 08:33:04 -04:00
committed by GitHub
parent 311ab3dd5f
commit 7d8c0015e5
+6
View File
@@ -320,6 +320,10 @@ Try
$TSVariableDictionary.'OSDiskNumber' = $OutputObjectProperties.DesiredOperatingSystemDisk.DiskNumber $TSVariableDictionary.'OSDiskNumber' = $OutputObjectProperties.DesiredOperatingSystemDisk.DiskNumber
$TSVariableDictionary.'OSDDiskCount' = $OutputObjectProperties.DiskListCount $TSVariableDictionary.'OSDDiskCount' = $OutputObjectProperties.DiskListCount
Switch ($TSVariableDictionary.Keys.Count -gt 0)
{
{($_ -eq $True)}
{
ForEach ($TSVariable In $TSVariableDictionary.GetEnumerator()) ForEach ($TSVariable In $TSVariableDictionary.GetEnumerator())
{ {
$LoggingDetails.LogMessage = "$($GetCurrentDateTimeMessageFormat.Invoke()) - Attempting to the value of task sequence variable `"$($TSVariable.Key)`" to `"$($TSVariable.Value)`". Please Wait..." $LoggingDetails.LogMessage = "$($GetCurrentDateTimeMessageFormat.Invoke()) - Attempting to the value of task sequence variable `"$($TSVariable.Key)`" to `"$($TSVariable.Value)`". Please Wait..."
@@ -334,6 +338,8 @@ Try
} }
} }
} }
}
}
Catch Catch
{ {
$ErrorHandlingDefinition.Invoke(2, $True) $ErrorHandlingDefinition.Invoke(2, $True)