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

Get-WmiObject not supported in newer versions of Powershell #3

Open
tggbco opened this issue Jun 7, 2023 · 1 comment
Open

Get-WmiObject not supported in newer versions of Powershell #3

tggbco opened this issue Jun 7, 2023 · 1 comment

Comments

@tggbco
Copy link

tggbco commented Jun 7, 2023

Apparently, the last version that supported this was ver 5.1. I'm using Powershell 6 and it's not supported. Based on the link below, it appears that Powershell 7.3 is the most recent.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1

Error details:
Get-WmiObject : The term 'Get-WmiObject' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Vito\Downloads\Gigabyte-main\Gigabyte-main\GigaTest.ps1:398 char:10

  • $model = Get-WmiObject win32_baseboard | Select-Object Product
  •      ~~~~~~~~~~~~~
    
  • CategoryInfo : ObjectNotFound: (Get-WmiObject:String) [], CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException
@n0x08
Copy link
Collaborator

n0x08 commented Jun 12, 2023

Hi, I've tested this out on my Windows 11 Pro system with Powershell 7.3.4 and that call is still there:

PowerShell 7.3.4
PS C:\Users\User> Get-WmiObject win32_baseboard | Select-Object Product

Product
-------
0WPMMN

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