How can we run this script for generating the report for remote computers ?

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Jack Jack 5 months, 1 week ago.

  • Author
    Posts
  • #64036
    Profile photo of sandeep chavan
    sandeep chavan
    Participant

    How can we run this script for generating the report for remote computers ? Thanks in advance.

  • #64041
    Profile photo of sandeep chavan
    sandeep chavan
    Participant

    Need script to list services from a local or remote computer where the StartMode property is set to "Automatic" and where the state is different from RUNNING

  • #64042
    Profile photo of Jack
    Jack
    Participant

    I think this is what you are looking for but may be wrong.
    As far as I am aware you can't get all of this information from Get-Service. Instead you'll need to use Get-CimInstance (or Get-WMIObject)

    Get-CimInstance -ComputerName Server1 -ClassName Win32_Service | Where {($_.StartMode -eq "Automaic") -and ($_.Status -ne "Running")}
    

You must be logged in to reply to this topic.