记录经常使用的PowerShell、Bash命令
带日期时间的Ping
bash
1Windows:
2ping -t 192.168.1.1 | ForEach-Object { "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') $_" }带日期时间的Tcping
bash
1Windows:
2tcping -t 192.168.1.1 | ForEach-Object { "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') $_" }生成32位Base64的PSK
bash
1Windows:
2[Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Maximum 256 }))
3
4Linux:
5openssl rand -base64 32