Notify with PowerShell

通知:PowerShell


function Send-Text($Text) {$remoteIPstr='127.0.0.1';$Port=50210;$remoteIP = [System.Net.IPAddress]::Parse($remoteIPstr);$endpoint = New-Object System.Net.IPEndPoint ($remoteIP,$Port);$udpclient= New-Object System.Net.Sockets.UdpClient;$bytes=[Text.Encoding]::UTF8.GetBytes($Text);$bytesSent=$udpclient.Send($bytes,$bytes.length,$endpoint);$udpclient.Close();}
Send-Text '{"APIkey": "MeowNotify","Content": "PowerShellから通知","Title": "MeowNotify","Type": "HTML","nSecondsToClose":0}';