Check CSV for hostname problem

Home Forums Scripting PowerShell Check CSV for hostname problem

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    jason0923
    Member
    #166835

    I’m obviously not a powershell expert so I’m wondering if there is a way to do this. I have a CSV with thousands of PC names. I want to run a script against if from the various computers so if that PC’s hostename is in the then Do something so somthing to the extent of

    Import-Csv C:test.Csv
    If hostname is in CSV then (for example reboot)

    I can import the CSV but not sure the syntax for something like if hostname is there =true

    Is this possible?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.