Pages

WMI Connectivity Check

Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = True

objExcel.Workbooks.Add

intRow = 2

 

objExcel.Cells(1, 1).Value = "Machine Name"

objExcel.Cells(1, 2).Value = "Status"

objExcel.Cells(1, 3).Value = "Error Number"

objExcel.Cells(1, 4).Value = "Hex Error Number"

objExcel.Cells(1, 5).Value = "Error Description"

 

Set Fso = CreateObject("Scripting.FileSystemObject")

Set InputFile = fso.OpenTextFile("MachineList.Txt")

Do While Not (InputFile.atEndOfStream)

strComputer = InputFile.ReadLine

 

On Error Resume Next

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Wmi")

objExcel.Cells(intRow, 1).Value = UCase(strComputer)

 

If Err.Number <> 0 Then

objExcel.Cells(intRow, 2).Value = "Error"

objExcel.Cells(intRow, 3).Value = Err.Number

objExcel.Cells(intRow, 4).Value = Hex(Err.Number)

ElseIf Err.Number = 0 Then

objExcel.Cells(intRow, 2).Value = "Success"

objExcel.Cells(intRow, 5).Value = "No Errors"

Err.Clear

End If

 

If Err.Number = 462 Then

objExcel.Cells(intRow, 5).Value = "Machine Not Found"

ElseIf Err.Number = "-2147217394" Then

objExcel.Cells(intRow, 5).Value = "WMI Class Not Found"

ElseIf Err.Number = "-2147217405" Then

objExcel.Cells(intRow, 5).Value = "Access Denied"

Err.Clear

End If

 

If objExcel.Cells(intRow, 2).Value = "Error" Then

objExcel.Cells(intRow, 2).Font.ColorIndex = 3

Else

objExcel.Cells(intRow, 2).Font.ColorIndex = 10

End If

 

intRow = intRow + 1

Loop

 

objExcel.Range("A1:E1").Select

objExcel.Selection.Interior.ColorIndex = 19

objExcel.Selection.Font.ColorIndex = 11

objExcel.Selection.Font.Bold = True

objExcel.Cells.EntireColumn.AutoFit

 

MsgBox "Done"


-------------------
Thanks,
http://paddymaddy.blogspot.com/

Admin$ check

Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = True

objExcel.Workbooks.Add

intRow = 2

 

objExcel.Cells(1, 1).Value = "Machine Name"

objExcel.Cells(1, 2).Value = "Admin Share Exists"

 

Set Fso = CreateObject("Scripting.FileSystemObject")

Set InputFile = fso.OpenTextFile("MachineList.Txt")

Do While Not (InputFile.atEndOfStream)

strComputer = InputFile.ReadLine

 

On Error Resume Next

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colShares = objWMIService.ExecQuery("Select * from Win32_Share Where Name = 'ADMIN$'")

 

objExcel.Cells(intRow, 1).Value = UCase(strComputer)

If colShares.Count > 0 Then

objExcel.Cells(intRow, 2).Value = "Yes"

Else

objExcel.Cells(intRow, 2).Value = "No"

End If

If Err.Number <> 0 Then

objExcel.Cells(intRow, 2).Value = Err.Description

Err.Clear

End If

intRow = intRow + 1

 

objExcel.Range("A1:B1").Select

objExcel.Selection.Interior.ColorIndex = 19

objExcel.Selection.Font.ColorIndex = 11

objExcel.Selection.Font.Bold = True

objExcel.Cells.EntireColumn.AutoFit

loop

 

Wscript.Echo "Done"


-------------------
Thanks,
http://paddymaddy.blogspot.com/

Remote Systems Discovery Data Collection Cycle Client agent initiate

On Error Resume Next
Dim oCPAppletMgr
Set oCPAppletMgr = CreateObject("CPApplet.CPAppletMgr")
Dim oClientActions
Set oClientActions = oCPAppletMgr.GetClientActions()
Dim oClientAction
For Each oClientAction In oClientActions
If oClientAction.Name = "Discovery Data Collection Cycle" Then
oClientAction.PerformAction
End If
If oClientAction.Name = "Request & Evaluate Machine Policy" Then
oClientAction.PerformAction
End If
Next

-------------------
Thanks,
http://paddymaddy.blogspot.com/

My other blog for CBTS and Hack Stuff


-------------------
Thanks,
http://paddymaddy.blogspot.com/

Microsoft MSXML6 msxml6.msi Silent installation

To install msxml6.msi Silent installation
msxml6.msi /qb
-------------------
Thanks,
http://paddymaddy.blogspot.com/

Philosophy Hero Socrates


Ancient Greek philosophy is dominated by three very famous men: Socrates, Plato, and Aristotle. All three of these lived in Athens for most of their lives, and they knew each other. Socrates came first, and Plato was his student, around 400 BC. Socrates was killed in 399 BC, and Plato began his work by writing down what Socrates had taught, and then continued by writing down his own ideas and opening a school. Aristotle, who was younger, came to study at Plato's school, and ended up starting his own school as well.

In the years after Plato and Aristotle died, in the 200's BC, three famous kinds of philosophy started up in the schools that Plato and Aristotle had started. These are the Stoics, the Skeptics, and the Epicureans. Each of these continued to be important ways of thinking about the world all the way through the Roman Empire, until people converted to Christianity in the 300's AD, and even after that.

BOOKS

Philosophy and Science in Ancient Greece: The Pursuit of Knowledge, by Don Nardo (2004). For teenagers. Don Nardo has written many books for young people about the ancient Greeks.

The Cambridge Companion to Greek and Roman Philosophy, edited by David Sedley (1997).

and also


-------------------
Thanks,
http://paddymaddy.blogspot.com/

http://www.historyforkids.org/

Good Links makes happy when you read them

-------------------
Thanks,
http://paddymaddy.blogspot.com/