Script for O/S and SP. Just enter your domain info:
----------------------------------------------------------- On Error GoTo 0 Const ADS_SCOPE_SUBTREE = 2 Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADSDSOObject" objConnection.Open "Active Directory Provider" 'your LDAP Query here strLDAPQuery = "LDAP://DC=domain,DC=com" 'get the working path of the script strScriptPath = replace(wscript.scriptfullname,wscript.scriptname,"") 'Create Excel workbook Set objXL = wscript.CreateObject("Excel.Application") objXL.Visible = True objXL.WorkBooks.Add 'Specify the file to write outputFile = strScriptPath & "Computer Accounts.xls" 'tell what row to start writing retrieved data to icount = 2 Set objCOmmand.ActiveConnection = objConnection objCommand.CommandText = _ "Select Name, Location, operatingSystem, operatingSystemServicePack from '" & strLDAPQuery & "' Where objectClass='computer'" objCommand.Properties("Page Size") = 1000 objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE Set objRecordSet = objCommand.Execute objRecordSet.MoveFirst objXL.ActiveSheet.Range("A1:D1").ColumnWidth = 20 ObjXL.ActiveSheet.Cells(1,1).Value = "Computer Name" ObjXL.ActiveSheet.Cells(1,2).Value = "Location" ObjXL.ActiveSheet.Cells(1,3).Value = "Operating System Version" ObjXL.ActiveSheet.Cells(1,4).Value = "Service Pack" objXL.Range("A1:E1").Select objXL.Selection.Font.Bold = True objXL.Selection.Interior.ColorIndex = 1 objXL.Selection.Interior.Pattern = 1 'xlSolid objXL.Selection.Font.ColorIndex = 2 Do Until objRecordSet.EOF On Error GoTo 0 'If InStr(LCase(objRecordSet.Fields("OperatingSystem").Value),"server") Then ObjXL.ActiveSheet.Cells(icount,1).Value = objRecordSet.Fields("Name").Value ObjXL.ActiveSheet.Cells(icount,2).Value = objRecordSet.Fields("Location").Value ObjXL.ActiveSheet.Cells(icount,3).Value = objRecordSet.Fields("OperatingSystem").Value ObjXL.ActiveSheet.Cells(icount,4).Value = objRecordSet.Fields("operatingSystemServicePack").Value 'End If icount = icount + 1 objRecordSet.MoveNext Loop Set ObjXL = Nothing ------------------------------------------------------------ Don Guyer Windows Systems Engineer RIM Operations Engineering Distributed - A Team, Tier 2 Enterprise Technology Group Fiserv don.gu...@fiserv.com Office: 1-800-523-7282 x 1673 Fax: 610-233-0404 www.fiserv.com <http://www.fiserv.com/> From: Garcia-Moran, Carlos [mailto:cgarciamo...@spragueenergy.com] Sent: Wednesday, September 21, 2011 3:04 PM To: NT System Admin Issues Subject: RE: IT: How to Tell Remotely what Service Pack (Office, and Windows) remote PC is running Or Lansweeper From: Cameron [mailto:cameron.orl...@gmail.com] Sent: Wednesday, September 21, 2011 3:03 PM To: NT System Admin Issues Subject: Re: IT: How to Tell Remotely what Service Pack (Office, and Windows) remote PC is running Spiceworks will give you all the info you need On Wed, Sep 21, 2011 at 3:00 PM, justino garcia < jgarciaitl...@gmail.com> wrote: Any way to get this info, remotely. I checked my kbox, and it is not accurately saying the version of office installed. Running a script or some CMD line syntax to tell what Service Pack remote PC is running. Office 2007. Windows, XP, 7 and so on. Thanks, -- Justin IT-TECH ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin _________________________________________________________ This e-mail, including attachments, contains information that is confidential and may be protected by attorney/client or other privileges. This e-mail, including attachments, constitutes non-public information intended to be conveyed only to the designated recipient(s). If you are not an intended recipient, you are hereby notified that any unauthorized use, dissemination, distribution or reproduction of this e-mail, including attachments, is strictly prohibited and may be unlawful. If you have received this e-mail in error, please notify me by e-mail reply and delete the original message and any attachments from your system. _________________________________________________________ -- ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
<<image001.jpg>>