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

Ps script fixed

parent 5f75dc33
No related branches found
No related tags found
No related merge requests found
#ps1_sysnative
$ErrorActionPreference = 'Stop'
$ip = (int)%index%+2
$adapter = Get-NetAdapter
$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
<#ps1_sysnative#>
$ErrorActionPreference = 'Stop';
$ip = (int)%index%+2;
$adapter = Get-NetAdapter;
$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
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