ps/Modules/Alkami.PowerShell.SDK/Public/Add-OrbHostEntries.ps1

25 lines
824 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Add-OrbHostEntries {
<#
.SYNOPSIS
Adds all the known ORB entries to the hosts file
.LINK
Get-KnownDeveloperHostsEntries
#>
[CmdletBinding()]
[OutputType([string])]
param()
$logLead = Get-LogLeadName
$knownHostEntries = (Get-KnownDeveloperHostsEntries)
$existingRecords = Get-Host
Write-Host "$logLead : Adding hosts file entries"
foreach ($entry in $knownHostEntries) {
"Adding hosts file with IpAddress $($entry.IpAddress) and Hostname $($entry.Hostname)" | Out-Default -Transcript | Out-Null
<# For some reason it doesn't like IpAddress and it truncates it to Ip #>
#Update-HostsFileEntry -IpAddress $entry.IpAddress -Hostname $entry.Hostname
Update-HostsFileEntry -Ip $entry.IpAddress -Hostname $entry.Hostname | Out-Default -Transcript | Out-Null
}
}