convert bash command to powershell for udp client
Budget: $10 – $30 USD
Want to convert this bash command below to powershell command
$1 = '192.168.1.100'
echo -en '\x32\x31' > /dev/udp/$1/60001
powershell example:
$server = '192.168.1.100'
$port = '60001'
[Byte[]] $powerON = '\x31\x31'
$client = New-Object System.Net.Sockets.UdpClient
$client.Connect($server, $port)
$client.Send($powerON, $powerON.Length) | Out-Null
$client.Close()
$1 = '192.168.1.100'
echo -en '\x32\x31' > /dev/udp/$1/60001
powershell example:
$server = '192.168.1.100'
$port = '60001'
[Byte[]] $powerON = '\x31\x31'
$client = New-Object System.Net.Sockets.UdpClient
$client.Connect($server, $port)
$client.Send($powerON, $powerON.Length) | Out-Null
$client.Close()