Soo trying to do something like the following
$Computers = Get-Content .\~test.txt
ForEach ($Computer in $Computers) {
$computer.Attempts += 1
$computer.result = Successful
}
++ EDIT ++
The output i want is
$MyComputerName.Attempt += 1
$MyComputerName.result
So that each computer will have its own name creating a basic table within the script so that it doesn’t have to keep reading some information from a text file.
where $computer is the computer name in the text file. I am trying to do this to create a faster method of checking valuables.
Alright eventually got this thing figured out and was as follows. Import-CSV is a great tool for creating a new object for each line.
Computers.txt: