Get PSU App web client IP address

Get PSU App web client IP address

avatar
Product: PowerShell Universal
Version: 1.4.6


Is there support to retrieve the IP address of the clients current session?

avatar

Recommended Answer

You can use the $RemoteIpAddress value to get this.

Adam Driscoll
PowerShell Expert and Developer at Devolutions

All Comments (2)

avatar

You can use the $RemoteIpAddress value to get this.

Adam Driscoll
PowerShell Expert and Developer at Devolutions

avatar

This was returning a value that looks like ipv6 and ipv4. I cleaned it up like this:

$ipv4Address = $RemoteIpAddress -replace "^::ffff:", ""
New-UDAlert -Severity 'info' -Text ("Client IP: " + $ipv4Address)