Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreChecks.ps1 returns empty when my Computer(Desktop PC) connected to an UPS #389

Open
stephsix opened this issue Jul 20, 2024 · 1 comment

Comments

@stephsix
Copy link

stephsix commented Jul 20, 2024

In the Function Get-DesktopPC of PreChecks.ps1:

Function Get-DesktopPC
{
 $isDesktop = $true
 if(Get-WmiObject -Class win32_systemenclosure | Where-Object { $_.chassistypes -eq 9 -or $_.chassistypes -eq 10 -or $_.chassistypes -eq 14})
   {
   Write-Warning "Computer is a laptop. Laptop dedicated GPU's that are partitioned and assigned to VM may not work with Parsec." 
   Write-Warning "Thunderbolt 3 or 4 dock based GPU's may work"
   $isDesktop = $false }
 if (Get-WmiObject -Class win32_battery)
   { $isDesktop = $false }
 $isDesktop
}

it returns false when it detects a win32_battery in WmiObject. However, my computer incorrectly matches this condition when connected to an UPS.

@stephsix stephsix changed the title PreChecks.ps1 returns empty when my DesktopPC connected to an UPS PreChecks.ps1 returns empty when my Computer(Desktop PC) connected to an UPS Jul 20, 2024
@buenofarray
Copy link

Can confirm I just ran into this! I just edited the script for it to work. In any case, the GPU name should just be you graphic card's name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants