not sure if this will help
PowerShell Code Repository - Set-IPAddress
Been haveing some troubles with the script below i was wondering if anyone had any ideas?
When it runs it completes with an error 66, the gatway and dns change to the entered one but not the IP or subnet
$IP = Read-Host "Enter IP address (10.10.10.2)"
$MASK = Read-Host "Enter Subnet address (255.255.255.0)"
$GATEWAY = Read-Host "Enter Gateway address (10.10.10.254)"
$DNS = Read-Host "Enter DNS address (10.10.10.2)"
$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
There are currently 1 users browsing this thread. (0 members and 1 guests)