Private/Get-CloudShellIpAddress.ps1
function Get-CloudShellIpAddress { if ($PSVersionTable.OS -like "Linux*") { # Gotta use a shitty wrapper for `ip addr` here. $response = (ip addr | Where-Object {$_ -match 'inet'})[-1].split('/')[0].replace('inet ',$null).trim() } return $response } |