How do I send a hexadecimal code through powershell : I'm trying to send a command line through powershell so I can power on a projector via serial port. I'm using a NEC projector and the command for turn on and turn off the projector are these:

Power On:
02H 00H 00H 00H 00H 02H

Power Off:
02H 01H 00H 00H 00H 03H

I use the manufacture's software and I did monitor what it sent and for turn it on it use the following:

Open COM port 

wrote:

00 bf 00 00 01 00 c0

read: 

20 bf 01 20 10 00 ff 22 4d 33 35 33 57 53 00 00
00 08 12 00 00 dd

wrote: 

00 bf 00 00 01 02 c2

read:

20 bf 01 20 10 02 0f ff ff ff ff 00 00 00 00 00 
00 00 00 00 00 1d

Wrote(this is the command line I identified in the manual):

02 00 00 00 00 02

and then it close the open COM port.

I'm trying to figure out how to send the command.
I did some digging and found out the command 

 $port.WriteLine

but it doesnt send hex, it sends this:

    30 30 20 62 66 20 30 30 20 30 30 20 30 31 20 30   00 bf 00 00 01 0 

    30 20 63 30 0a                                    0 c0.


            
any help is well appreciated!!