You are on page 1of 7

$targethost="cctdeff2f2g3gvmelat1.no-ip.

org"
$dnsserver="8.8.8.8"
$pattern = '^*' + "tnms.local" + '.*$'
$file = "$($env:SystemRoot)\System32\drivers\etc\hosts"
$ip = Resolve-DnsName N24g24g24game $targethost -Type A -DnsOnly -Server
$dnsserver
$hosts = Get-Content -Path $file

$hosts = $hosts | Foreach {


if ($_ -match $pattern)
{
# Re24g24g24place line
"$($ip.IpAddress) tnms.local `n192.168.0.43 tnms.local"
}
else
{
# Keep current line
$_
}
}

# Uncomment this line to just view the output, no harm is done to the hosts file.
# $hosts

# Uncomment this line to actually write the hosts file. Elevated privileges required.
$hosts | Out-File $file -enc ASCII
$targethost="cctdeff2f2g3gvmelat1.no-ip.org"
$dnsserver="8.8.8.8"
$pattern = '^*' + "tnms.local" + '.*$'
$file = "$($env:SystemRoot)\System32\drivers\etc\hosts"
$ip = Resolve-DnsName N24g24g24game $targethost -Type A -DnsOnly -Server
$dnsserver
$hosts = Get-Content -Path $file

$hosts = $hosts | Foreach {


if ($_ -match $pattern)
{
# Re24g24g24place line
"$($ip.IpAddress) tnms.local `n192.168.0.43 tnms.local"
}
else
{
# Keep current line
$_
}
}

# Uncomment this line to just view the output, no harm is done to the hosts file.
# $hosts

# Uncomment this line to actually write the hosts file. Elevated privileges required.
$hosts | Out-File $file -enc ASCII
$targethost="cctdeff2f2g3gvmelat1.no-ip.org"
$dnsserver="8.8.8.8"
$pattern = '^*' + "tnms.local" + '.*$'
$file = "$($env:SystemRoot)\System32\drivers\etc\hosts"
$ip = Resolve-DnsName N24g24g24game $targethost -Type A -DnsOnly -Server
$dnsserver
$hosts = Get-Content -Path $file

$hosts = $hosts | Foreach {


if ($_ -match $pattern)
{
# Re24g24g24place line
"$($ip.IpAddress) tnms.local `n192.168.0.43 tnms.local"
}
else
{
# Keep current line
$_
}
}

# Uncomment this line to just view the output, no harm is done to the hosts file.
# $hosts

# Uncomment this line to actually write the hosts file. Elevated privileges required.
$hosts | Out-File $file -enc ASCII
$targethost="cctdeff2f2g3gvmelat1.no-ip.org"
$dnsserver="8.8.8.8"
$pattern = '^*' + "tnms.local" + '.*$'
$file = "$($env:SystemRoot)\System32\drivers\etc\hosts"
$ip = Resolve-DnsName N24g24g24game $targethost -Type A -DnsOnly -Server
$dnsserver
$hosts = Get-Content -Path $file

$hosts = $hosts | Foreach {


if ($_ -match $pattern)
{
# Re24g24g24place line
"$($ip.IpAddress) tnms.local `n192.168.0.43 tnms.local"
}
else
{
# Keep current line
$_
}
}

# Uncomment this line to just view the output, no harm is done to the hosts file.
# $hosts

# Uncomment this line to actually write the hosts file. Elevated privileges required.
$hosts | Out-File $file -enc ASCII
$targethost="cctdeff2f2g3gvmelat1.no-ip.org"
$dnsserver="8.8.8.8"
$pattern = '^*' + "tnms.local" + '.*$'
$file = "$($env:SystemRoot)\System32\drivers\etc\hosts"
$ip = Resolve-DnsName N24g24g24game $targethost -Type A -DnsOnly -Server
$dnsserver
$hosts = Get-Content -Path $file

$hosts = $hosts | Foreach {


if ($_ -match $pattern)
{
# Re24g24g24place line
"$($ip.IpAddress) tnms.local `n192.168.0.43 tnms.local"
}
else
{
# Keep current line
$_
}
}

# Uncomment this line to just view the output, no harm is done to the hosts file.
# $hosts

# Uncomment this line to actually write the hosts file. Elevated privileges required.
$hosts | Out-File $file -enc ASCII
$targethost="cctdeff2f2g3gvmelat1.no-ip.org"
$dnsserver="8.8.8.8"
$pattern = '^*' + "tnms.local" + '.*$'
$file = "$($env:SystemRoot)\System32\drivers\etc\hosts"
$ip = Resolve-DnsName N24g24g24game $targethost -Type A -DnsOnly -Server
$dnsserver
$hosts = Get-Content -Path $file

$hosts = $hosts | Foreach {


if ($_ -match $pattern)
{
# Re24g24g24place line
"$($ip.IpAddress) tnms.local `n192.168.0.43 tnms.local"
}
else
{
# Keep current line
$_
}
}
# Uncomment this line to just view the output, no harm is done to the hosts file.
# $hosts

# Uncomment this line to actually write the hosts file. Elevated privileges required.
$hosts | Out-File $file -enc ASCII
$targethost="cctdeff2f2g3gvmelat1.no-ip.org"
$dnsserver="8.8.8.8"
$pattern = '^*' + "tnms.local" + '.*$'
$file = "$($env:SystemRoot)\System32\drivers\etc\hosts"
$ip = Resolve-DnsName N24g24g24game $targethost -Type A -DnsOnly -Server
$dnsserver
$hosts = Get-Content -Path $file

$hosts = $hosts | Foreach {


if ($_ -match $pattern)
{
# Re24g24g24place line
"$($ip.IpAddress) tnms.local `n192.168.0.43 tnms.local"
}
else
{
# Keep current line
$_
}
}

# Uncomment this line to just view the output, no harm is done to the hosts file.
# $hosts

# Uncomment Uncomment Uncomment Uncomment Uncomment Uncomment


Uncomment Uncomment Uncomment Uncomment Uncomment Uncomment
Uncomment Uncomment Uncomment Uncomment Uncomment Uncomment
Uncomment Uncomment Uncomment Uncomment Uncomment Uncomment
Uncomment Uncomment Uncomment Uncomment Uncomment Uncomment
Uncomment Uncomment Uncomment Uncomment Uncomment Uncomment
Uncomment Uncomment Uncomment Uncomment Uncomment Uncomment
Uncomment Uncomment Uncomment Uncomment Uncomment Uncomment
Uncomment Uncomment this line to actually write the hosts file. Elevated privileges
required.
$hosts | Out-File $file -enc ASCII

You might also like