getting a list of remote services
Hi all, Insted of logging to every computer and to check if the sms service is running, i decided to create a powershell script. this script will get the name of the remote computers, and give me the putput result in HTM frmat. So far i managed to get it going only with one computer every at a time, unfortunatlly the powershell help didn't help me as thought. this is the batch i'm using right now. Get-Service ccm* -computername pc2367 | Select-Object Status, Name, DisplayName | ConvertTo-HTML | Out-File C:\Test\Test.htm Invoke-Expression C:\test1\Test.htm How can i modify it to get the result from multiple computers that i use in a txt file? Please advise, Best regards, Nahum.
May 20th, 2012 3:10am

This should really be put on a PowerShell forum because it nothing to do with ConfigMgr itself. Why not use ConfigMgr for this task though? Information from Win32_Service is already collected by default by HW Inv.Jason | http://blog.configmgrftw.com | Twitter @JasonSandys
Free Windows Admin Tool Kit Click here and download it now
May 20th, 2012 10:33am

you can use psexec to run this command on multiple computers and pipe the output to text file . something like : psexec @computers.txt -c D:\scripts\powershell.ps1 Please click on "vote as Helpful" if you feel this post helpful to you. Eswar Koneti | My Tech blog: www.eskonr.com | Linkedin: Eswar Koneti
May 21st, 2012 9:37am

if sms agent host is stopped,nothing is reported back to site server and not instant results as like powershell given abovePlease click on "vote as Helpful" if you feel this post helpful to you. Eswar Koneti | My Tech blog: www.eskonr.com | Linkedin: Eswar Koneti
Free Windows Admin Tool Kit Click here and download it now
May 21st, 2012 9:39am

True, but then why put this question in a ConfigMgr forum if a ConfigMgr solution is not desired. Just because it's the ConfigMgr agent service being queried does not make this a ConfigMgr question as there's nothing unique about querying for it.Jason | http://blog.configmgrftw.com | Twitter @JasonSandys
May 21st, 2012 11:43am

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

Other recent topics Other recent topics