Find the subnet you are actually on
**Get-NetIPAddress** shows the prefix length next to the address, and the prefix length is what defines the sweep range. A /24 has 254 hosts, a /16 has 65 534 and should be split.
Get-NetIPConfiguration | Select-Object InterfaceAlias,IPv4Address,IPv4DefaultGateway
Get-NetIPAddress -AddressFamily IPv4 | Where-Object PrefixOrigin -ne 'WellKnown' | Select-Object IPAddress,PrefixLength,InterfaceAlias