Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List all Properties and values of ClassContent of List all Properties and values of Class.ps1MD5 Hash: 6772FB534CD96342A3989A7A50108B32 |
||
$wmiClass = "win32_operatingsystem"
$strComputer = "." $wmiNS = "\root\cimv2" $wmiQuery = "Select * from " + $wmiClass $strUsr ="" #Blank for current security. Domain\Username $strPWD = "" #Blank for current security. $strLocl = "MS_409" #US English. Can leave blank for current language $strAuth = "" #if specify domain in strUsr this must be blank $iFlag = "0" #only two values alllowed: 0 and 128. $objLocator = New-Object -comobject "WbemScripting.SWbemLocator" $objWMIService = $objLocator.ConnectServer($strComputer, ` $wmiNS, $strUsr, $strPWD, $strLocl, $strAuth, $iFLag) $colItems = $objWMIService.ExecQuery($wmiQuery) foreach ($objItem In $colItems) {"`n" foreach ($i in $objItem.properties_) {Write-Host $i.name.tostring(), " `t" , $i.value.tostring()} } | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |