diff --git a/Invoke-OperatingSystemDiskDetection.ps1 b/Invoke-OperatingSystemDiskDetection.ps1 index cfacfa8..deb32a6 100644 --- a/Invoke-OperatingSystemDiskDetection.ps1 +++ b/Invoke-OperatingSystemDiskDetection.ps1 @@ -157,9 +157,9 @@ Try Switch -Regex ($_.MediaType) { '(^4$)|(^SSD$)' {1} - '(^3$)|(^HDD$)' {2} - '(^5$)|(^SCM$)' {3} - '(^0$)|(^Unspecified$)' {4} + '(^3$)|(^HDD$)' {2} + '(^5$)|(^SCM$)' {3} + '(^0$)|(^Unspecified$)' {4} } } @@ -167,23 +167,23 @@ Try Switch -Regex ($_.BusType) { '(^17$)|(^NVMe$)' {1} - '(^11$)|(^SATA$)' {2} - '(^8$)|(^RAID$)' {3} - '(^10$)|(^SAS$)' {4} - '(^12$)|(^SD$)' {5} - '(^7$)|(^USB$)' {6} - '(^1$)|(^SCSI$)' {7} - '(^6$)|(^Fibre Channel$)' {8} - '(^3$)|(^ATA$)' {9} - '(^15$)|(^File Backed Virtual$)' {10} - '(^2$)|(^ATAPI$)' {11} - '(^4$)|(^1394$)' {12} - '(^5$)|(^SSA$)' {13} - '(^9$)|(^iSCSI$)' {14} - '(^13$)|(^MMC$)' {15} - '(^14$)|(^MAX$)' {16} - '(^16$)|(^Storage Spaces$)' {17} - '(^0$)|(^Unknown$)' {18} + '(^11$)|(^SATA$)' {2} + '(^8$)|(^RAID$)' {3} + '(^10$)|(^SAS$)' {4} + '(^12$)|(^SD$)' {5} + '(^7$)|(^USB$)' {6} + '(^1$)|(^SCSI$)' {7} + '(^6$)|(^Fibre Channel$)' {8} + '(^3$)|(^ATA$)' {9} + '(^15$)|(^File Backed Virtual$)' {10} + '(^2$)|(^ATAPI$)' {11} + '(^4$)|(^1394$)' {12} + '(^5$)|(^SSA$)' {13} + '(^9$)|(^iSCSI$)' {14} + '(^13$)|(^MMC$)' {15} + '(^14$)|(^MAX$)' {16} + '(^16$)|(^Storage Spaces$)' {17} + '(^0$)|(^Unknown$)' {18} '(^18$)|(^Microsoft Reserved$)' {19} } } @@ -324,4 +324,4 @@ Finally $OutputObject = New-Object -TypeName 'System.Management.Automation.PSObject' -Property ($OutputObjectProperties) Write-Output -InputObject ($OutputObject) - } \ No newline at end of file + }