$servername = "SERVER01"

get-wmiobject win32_networkadapterconfiguration -computername $servername -ea stop | ? {$_.IPEnabled}

# Result:

DHCPEnabled      : False

IPAddress        : {10.10.10.10}

DefaultIPGateway : {10.10.10.254}

DNSDomain        :

ServiceName      : netvsc

Description      : Microsoft Hyper-V Network Adapter

Index            : 0

(get-wmiobject win32_networkadapterconfiguration -computername $servername -ea stop | ? {$_.IPEnabled}).IPSubnet

#Result:

255.255.255.0