Tuesday 25 February 2014

Full computer details in a excel



This script is very important for someone in IT infra and provide all information in one excel file which he ever dreamed of. This collects hostname, manufacturer, bios version, release date, serial number, user domain and logged in user name.


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
   Set colBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_BIOS")

Set wshNetwork = WScript.CreateObject( "WScript.Network" )
Set Excel = WScript.CreateObject("Excel.Application")
Set ExWb = Excel.Workbooks.Open("C:\test.xls",,False)
Set ExWs = ExWb.Worksheets(1)
r = 1
Do Until len(Excel.Cells(r, 1).value) = 0
r = r + 1
Loop
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
For Each objItem in colItems
Excel.cells(r, 6).value = objItem.Model
Excel.cells(r, 13).value = Now
Next
Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory",,48)
For Each objItem in colItems

    Excel.cells(r, 12).value = objItem.Capacity
Next
For each objBIOS in colBIOS
    Excel.cells(r, 5).value = objBIOS.InstallableLanguages
    Excel.cells(r, 4).value = objBIOS.Manufacturer
    Excel.cells(r, 7).value = objBIOS.Name
    Excel.cells(r, 8).value = objBIOS.PrimaryBIOS
    Excel.cells(r, 9).value = objBIOS.ReleaseDate
    Excel.cells(r, 3).value = objBIOS.SerialNumber
    Excel.cells(r, 11).value = objBIOS.SMBIOSBIOSVersion
    For i = 0 to Ubound(objBIOS.BiosCharacteristics)
    Excel.cells(r, 17).value = objBIOS.BiosCharacteristics(i)
    Next
Next
Excel.cells(r, 1).value = wshNetwork.UserDomain
Excel.cells(r, 2).value = wshNetwork.UserName
ExWb.Save
Excel.Application.Quit


Regards,
Baij

Real Physical Memory Size in Machine

I have created one script to figure out the machine physical memory. This will provide its size in MB as well as in GB. It is dificult to know the exact size while applying simple coding Thus I created one with more coding and can be used the exact size.

Start

On Error Resume Next
Const GB = 1073741824
Const MB = 1048576
Dim Obj, Wmi

Set Wmi = GetObject("winmgmts:\\.\root\CIMV2")
For Each Obj In Wmi.ExecQuery("SELECT * FROM Win32_ComputerSystem")
 If Obj.TotalPhysicalMemory > Int(GB) Then
  msgbox _
  "Total Physical Memory : " & FormatNumber(Obj.TotalPhysicalMemory / GB,2) & " GB"
 Else
  msgbox _
  "Total Physical Memory : " & FormatNumber(Obj.TotalPhysicalMemory / MB,2) & " MB"
 End If
Next

Finish

Regards, IIS

Configure Dual Monitor





Today, We'll configure Dual Monitor on windows XP. Please follow the steps given below.

Right click on desktop and select properties.

How to allow websites in Barracuda.

How to allow websites in Barracuda.

Open the admin URL of barracuda and enter the admin credentials.

How to activate SIP accounts after creation

How to activate SIP accounts after creation.

1.       Login to dialer through putty.

How to Access ESXi Server Remotely

How to Access ESXi Server Remotely.

1.       Download  “vSphere Client” directly from Internet.
2.       Save setup.


Unable to see Images in Internet explorer

There have been many incidence where we get this issue where internet explorer is unable to show any images on a webpage. This happens as Internet explorer is set at more security in the beginning when it is at default setting. We can follow below steps to solve the issues.

We need to open the command prompt with administrator privileges and type below command.

secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose.

Post running the command restart IE and you would be able to restore all images.

If above said command does not work for you. There is probably some issues with the DNS Server. We can cross check by chaging the DNS server to 8.8.8.8 and check.

Regards, IIS

Symantec Altiris - Software reports

Since there are so many limitation in the altiris as far as pulling customized reports out of it. I had co-ordinated with them once and got to know that they will neither help you in this case and will refer some of its vendor for this service and there they would charge you very handsome amount.

After a long discussion with them I could completely release that this is something upto me and started exploring more myself. I got to know there is also a way to fetch the reports from its database which is quite simple if you get know basic things about SQL queries. Thus I created one query that helped out in pulling one which was in request those days. This query will pull Operating System, Computer Name and Specific Software Installed in the machines.

Start

select B.Name as TargetComputerName,

                  B.[OS Name],

                  a.DisplayName,a.InstallDate

       from  dbo.Inv_AddRemoveProgram  A Inner Join Evt_Push_Agent_Install_Service B

       ON A._ResourceGuid = B.TargetComputerGuid
     
       where A.DisplayName='Microsoft Office Standard 2007'

Finish

Regards, IIS


Install Multiple Software with a Click