Script to get IP address of remote computer

Copper Contributor

Hi Experts,

 

I'm looking to create a script for getting the IP address of remote computer as the ping hostname command is giving the right IP Address.

Tried writing a script with get-netipaddress but wasn't able to get the script to connect with the remote computer to get the result.

 

However I was able to robo copy to the system and execute the ps file.

Thanks in advance

2 Replies
Get-NetIPAddress -CimSession nameofcomputer doesn't work? (So, Get-NetIPAddress -CimSession computer001 for example?)
Any update?