PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. You can learn more and download at https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
This is a PsExec script to modify connection filter to add the trusted IP addresses. This is required if you are going to use our service infront of Office365 or if you are doing a tenant migration. Without this tool the only other way to add IP's to Office365 is to copy/paste each one, which can be time consuming.
The content in quotes will be specific and custom to your tenant’s naming convention:
HostedConnectionFilterPolicy "Connection Filter Policy" -IPAllowList 22.214.171.124,126.96.36.199, 188.8.131.52,184.108.40.206, 220.127.116.11,18.104.22.168, 22.214.171.124,126.96.36.199,54. 186.172.23,188.8.131.52,54. 149.155.156,184.108.40.206,54. 213.22.21,220.127.116.11,54. 186.218.12,18.104.22.168,54. 149.205.143,22.214.171.124,54. 148.30.215,126.96.36.199,54.68. 193.51,188.8.131.52,54.149. 154.28,184.108.40.206,54.186. 22.84,220.127.116.11,52.28.30. 98,18.104.22.168,22.214.171.124, 126.96.36.199,188.8.131.52, 184.108.40.206,220.127.116.11,52. 58.5.29,18.104.22.168,22.214.171.124
Please ensure that all of the IP's are added.