Skip to content

Commit

Permalink
Update getIPs.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey authored Apr 23, 2019
1 parent 54ebedc commit b8f6bf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test-compose/getIPs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
$idpcid = docker ps | Select-String 'idp' | ForEach-Object { $_.Line.split(' ')[0] }
$spcid = docker ps | Select-String 'sp' | ForEach-Object { $_.Line.split(' ')[0] }

$idpip = (docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" $idpcid)
$spip = (docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" $spcid)
If ($idpcid -ne $null) {$idpip = (docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" $idpcid)} Else {$idpip = "Not-Found"}
If ($spcid -ne $null) {$spip = (docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" $spcid)} Else {$spip = "Not-Found"}

$msg = $($idpip.Trim()) + ' idp.example.edu' + "`r`n" + $($spip.Trim()) + ' sptest.example.edu'

Set-Clipboard -Value $msg

Write-Host ''
Write-Host $($msg)
Write-Host $($msg + "`r`n")
Write-Host ' **above entries copied to clipboard'
Write-Host ''
Write-Host ''

0 comments on commit b8f6bf8

Please sign in to comment.