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

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.

February 13th, 2015 2:16am

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.
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 2:30am

can we do this through query instead of selecting the multiple online devices....
February 13th, 2015 2:41am

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/
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 2:48am

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

February 13th, 2015 4:57am

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.
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 5:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics