Answered by:
SCCM Client installation to only Online machines from All Systems Device collection through Client Push

Question
-
Hi,
How can we create a device collection based on only online machines , than use that collection to install the sccm client through client push method.
Shailendra Dev
Friday, February 13, 2015 7:10 AM
Answers
-
ConfigMgr is not a real-time product. It won't be dynamically able to tell you what is currently "online" and create a collection from it.
Gerry Hampson | Blog: www.gerryhampsoncm.blogspot.ie | LinkedIn: Gerry Hampson | Twitter: @gerryhampson
- Proposed as answer by Garth JonesMVP Friday, February 13, 2015 11:18 AM
- Marked as answer by Joyce L Thursday, February 26, 2015 9:51 AM
Friday, February 13, 2015 10:08 AM
All replies
-
Right-click the device and select Add Selected Items > Add Selected Items to New Device Collection. Also, if you just want to push the client, you can also right-click the device and select Install Client. There is no requirement to do it via a collection.
My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoudeFriday, February 13, 2015 7:25 AM -
can we do this through query instead of selecting the multiple online devices....
Shailendra Dev
Friday, February 13, 2015 7:36 AM -
Yes, you could also query for the devices without a client, by using something like this: http://myitforum.com/myitforumwp/2012/02/11/configmgr-query-to-find-all-non-client-and-unassigned-machines-computers-and-servers/
My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoudeFriday, February 13, 2015 7:42 AM -
You can run a ping report and then create a collection from only the online machines:
Ping Report Script (Put the machine list in "pclist.txt" in the same folder):
--------------------------------------------------
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
If not objFSO.FileExists("Pclist.txt") THEN
wscript.echo "File not found,"&_
vbcrlf&"with a hard return at the end of each line."
wscript.quit
end if
tempobj="temp.txt"Set objTextFile = objFSO.OpenTextFile("Pclist.txt", ForReading)
logfile="results.csv"
Set ofile=objFSO.CreateTextFile(logfile,True)
strText = objTextFile.ReadAll
objTextFile.Close
wscript.echo "Ping starting"
ofile.WriteLine ","&"Ping Report -- Date: " & Now() & vbCrLf
arrComputers = Split(strText, vbCrLF)
for each item in arrcomputers
objShell.Run "cmd /c ping -n 1 -w 1200 " & item & " >temp.txt", 0, True
Set tempfile = objFSO.OpenTextFile(tempobj,ForReading)
Do Until tempfile.AtEndOfStream
temp=tempfile.readall
striploc = InStr(temp,"[")
If striploc=0 Then
strip=""
Else
strip=Mid(temp,striploc,16)
strip=Replace(strip,"[","")
strip=Replace(strip,"]","")
strip=Replace(strip,"w"," ")
strip=Replace(strip," ","")
End If
If InStr(temp, "Reply from") Then
ofile.writeline item & ","&strip&","&"Online."
ElseIf InStr(temp, "Request timed out.") Then
ofile.writeline item &","&strip&","&"No response (Offline)."
ELSEIf InStr(temp, "try again") Then
ofile.writeline item & ","&strip&","&"Unknown host (no DNS entry)."
End If
Loop
Next
tempfile.close
objfso.deletefile(tempobj)
ofile.writeline
ofile.writeline ","&"Ping complete "&now()
wscript.echo "completed."
objShell.Run("""C:\Program Files\Microsoft Office\OFFICE11\excel.exe """&logfile)------------------------------------------------------------------------------
-RG
Friday, February 13, 2015 9:51 AM -
ConfigMgr is not a real-time product. It won't be dynamically able to tell you what is currently "online" and create a collection from it.
Gerry Hampson | Blog: www.gerryhampsoncm.blogspot.ie | LinkedIn: Gerry Hampson | Twitter: @gerryhampson
- Proposed as answer by Garth JonesMVP Friday, February 13, 2015 11:18 AM
- Marked as answer by Joyce L Thursday, February 26, 2015 9:51 AM
Friday, February 13, 2015 10:08 AM