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

IP fix

parent da025990
No related branches found
No related tags found
No related merge requests found
<#ps1_sysnative#>
$ErrorActionPreference = 'Stop';
$ip = (int)%index%+2;
$ip = 0+2;
$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';
$user = [ADSI]'WinNT://./Administrator';
$user.SetPassword('Password.1');
NET USER pv176 Password.1 /add;
NET LOCALGROUP Administrators pv176 /add;
exit 1001;
\ No newline at end of file
exit 1001;
\ No newline at end of file
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