Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog

WMI/PS: Récupérer model/PN/Constructeur machine en powershell

Publié le par damcuvelier

 

#récuperer le fabricant et le modèle du pc
$ComputersystemObj = Get-WmiObject Win32_Computersystem
$Make = $ComputersystemObj.manufacturer
$PN = $ComputersystemObj.model
$Model = $ComputersystemObj.Version
write-host "Information = ""Valeur"""
write-host "Constructeur = ""$($Make)"""
write-host "PartNumber = ""$($PN)"""
if ($Model -eq $NULL)
{}
else
{write-host "Model = ""$($Model)"""}

Commenter cet article

L
Hey, mate your article seems interesting. I just spent myself reading it completely till the last line as it seemed so interesting to spend time with! I have to admit that the subject you’ve shared seems to be rare on internet. Thanks for sharing the informative post. Keep posting.
Répondre
D
I don't think it is so rare. But happy to help. Cheers!
B
These interesting and useful information on a personal computer I vzahvati. You do a good job of luck.
Répondre
D
thx.
E
Ces informations intéressantes et utiles sur un ordinateur personnel que je vzahvati. Vous faites un bon travail de la chance.
Répondre
D
UR Welcome ;)
A
Thanks so much for these instructions!!!! I use this feature a lot too, and your solutions has just worked perfectly!
Répondre
D
sorry i do not speak dutsh
Répondre