Intune
Bienvenue sur le Laboratoire Microsoft !
Nous sommes étudiants et travaillons sur des centaines de projets sur les technologies Microsoft.
Nous préparons la migration de ce portail vers les technologies SharePoint 2010.
L'équipe du Laboratoire Microsoft




[VBS] Obtenir des informations sur votre machine

Accueil > Script > maintenance > [VBS] Obtenir des informations sur votre machine

[VBS] Obtenir des informations sur votre machine

Par Christophe DOKOUTCHAEF,
Publiée le 16/09/2008 vers 14h.

Ce script permet d'obtenir quelques informations sur votre OS,comme sa version, son nom, son numéro de série etc...

[CODE]

' OperatingSystemInfo.vbs
' VBScript to document your Operating System
' Auteur DOKOUTCHAEF Christophe
' Version 1.1
' -------------------------------------------------------'
Option Explicit
Dim objWMIService, objItem, colItems
Dim strComputer, strList

On Error Resume Next
strComputer = "."

' WMI Connection to the object in the CIM namespace
Set objWMIService = GetObject("winmgmts:\\" _
& strComputer & "\root\cimv2")

' WMI Query to the Win32_OperatingSystem
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

' For Each... In Loop (Next at the very end)
For Each objItem in colItems
WScript.Echo "Machine Name: " & objItem.CSName & VbCr & _
"===================================" & vbCr & _
"Processor: " & objItem.Description & VbCr & _
"Manufacturer: " & objItem.Manufacturer & VbCr & _
"Operating System: " & objItem.Caption & VbCr & _
"Version: " & objItem.Version & VbCr & _
"Service Pack: " & objItem.CSDVersion & VbCr & _
"CodeSet: " & objItem.CodeSet & VbCr & _
"CountryCode: " & objItem.CountryCode & VbCr & _
"OSLanguage: " & objItem.OSLanguage & VbCr & _
"CurrentTimeZone: " & objItem.CurrentTimeZone & VbCr & _
"Locale: " & objItem.Locale & VbCr & _
"SerialNumber: " & objItem.SerialNumber & VbCr & _
"SystemDrive: " & objItem.SystemDrive & VbCr & _
"WindowsDirectory: " & objItem.WindowsDirectory & VbCr & _
""
Next
WSCript.Quit

' End of WMI Win32_OperatingSystem VBScript

[\CODE]
 



Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
1

Visites :
12973

1
2
3
4
5

Les Scripts Windows Suivant(e)(s)

03/10/2008 - Retrouver une clé Windows facilement et rapidement




Retrouvez ci-dessous les autres sections du Laboratoire Microsoft