I just ran the command again and it worked. Want me to send you a script and see if you get the same error?
Below is what i get taking your above code pasting it in a text file saving it .ps1 Then trying to run it.
out-lineoutput : Object of type "Microsoft.PowerShell.Commands.Internal.FormatStartData" is not legal or not in the correct sequence. This is likely caused by a user-specified "format-table" command which is conflicting with the default formatting.
This does not work. The ft returns the following error: out-lineoutput : Object of type "Microsoft.PowerShell.Commands.Internal.Format.
FormatStartData" is not legal or not in the correct sequence. This is likely ca
used by a user-specified "format-table" command which is conflicting with the d
efault formatting.