Skip to content
Snippets Groups Projects
Commit 680b9b7d authored by Martin Cuchran's avatar Martin Cuchran
Browse files

Fix ip generating

parent e3b78f39
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
$ErrorActionPreference = 'Stop'; $ErrorActionPreference = 'Stop';
$ip = 0+2; $ip = [int]$env:computername.split('-')[2]+2;
$adapter = Get-NetAdapter; $adapter = Get-NetAdapter;
$adapter | New-NetIPAddress -AddressFamily 'IPv4' -IPAddress "10.0.0.$($ip)" -PrefixLength '8' -DefaultGateway '10.0.0.1'; $adapter | New-NetIPAddress -AddressFamily 'IPv4' -IPAddress "10.0.0.$($ip)" -PrefixLength '8' -DefaultGateway '10.0.0.1';
$adapter | Set-DnsClientServerAddress -ServerAddresses '147.251.4.33'; $adapter | Set-DnsClientServerAddress -ServerAddresses '147.251.4.33';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment