I'm currently extracting data from a text file and then attempting to perform an action for each entry in the text file. See code below.
$Employees = Get-Content C:\User\Documents\UserWorkstations.txt Foreach($name in $Employees) { ping $name } After running my script it does not extract data from the text file and I get the following output:
cmdlet ForEach-Object at command pipeline position 2 Supply values for the following parameters: Process[0]: