The following is part of the file edit07.html: From $array I\'m able to access the $empid = $user.employeeid and $seat = $user.Position<
$array
$empid = $user.employeeid
$seat = $user.Position<
Get-Content returns not a single string, but array of strings (split on new lines) and array itself doesn't have a replace method. You can turn it into a single string with -Raw parameter or call replace method on each string in the array.