Skip to main content

Posts

Showing posts from 2011

IP script- you will gett IP if you provide hostname in the c:\script\computers.txt - SCCM

' PING-IP-to-Excel ' IP to Hostname --- or --- Hostname to IP '  ' Inspired by: Torgeir Bakken (MVP)   ' http://groups.google.com/group/microsoft.public.scripting.vbscript/msg/a465907f8dc6e265?pli=1 ' ' ' HOSTNAME  IP  RESULT  LATENCY ' --------  --  ------  ------- ' ' Using only PING at the command prompt ' ' Version 7.0 Jan/16/2011 ' Dim strHostname, strIP, strPingResult, IntLatency intRow = 2 Set objExcel = CreateObject("Excel.Application") With objExcel         .Visible = True     .Workbooks.Add         .Cells(1, 1).Value = "XXXXXXXXXXXXXXXXXXXXXXXXXXX"     .Cells(1, 2).Value = "XXXXXXXXXXXXXX"     .Cells(1, 3).Value = "XXXXXXX"     .Cells(1, 4).Value = "XXXXXXX"         .Range("A1:D1").Select     .Cells.EntireColumn.AutoFit         .Cells(1, 1).Value = "Hostname"     .Cells(1, 2).Value = "IP"     .Cells(1, 3).Value

To delete obsolete systems in SCCM

Simply create a collection, use a query to find all machines with "obsolete = 1". This way you can find all obsolete machines quickly. Then you can right click the collection and choose "delete special" to delete all machines in the collection. There is one maintenance task to delete obsolete machines. Default it is delete obsolete machines older than 90 days. You can change that to 60 days, or 30 days or whatever you like. Check out more in http://www.sccmsolutions.com/