When executing the below script, the output will be displayed very briefly as the script is closing. I am looking for a way to have the script pause after the output.
function Get-Hostname() {
$IP_Address = Read-Host -Prompt 'What is the target IP Address'
[System.Net.Dns]::GetHostByAddress("$IP_Address")
}
function Exit-Application() {
Read-Host "Press Enter to Exit Application"
exit
}
Get-Hostname
Exit-Application
Thanks in advance