Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
computer_science:windows:powershell:powershell_scripts:change_remote_ip_and_dns_powershell_script [2020/07/19 22:30] – created carlossousa | computer_science:windows:powershell:powershell_scripts:change_remote_ip_and_dns_powershell_script [2023/12/01 12:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Change remote IP address and DNS entry with a PowerShell script ====== | + | ====== |
|Original Source|[[https:// | |Original Source|[[https:// | ||
Line 148: | Line 148: | ||
Write-Verbose | Write-Verbose | ||
} | } | ||
+ | |||
</ | </ | ||
Line 154: | Line 155: | ||
* First, a computer name. If none is provided, it will attempt to perform the changes on the local computer. The function is kind enough to mention this to you (if you selected Verbose mode). | * First, a computer name. If none is provided, it will attempt to perform the changes on the local computer. The function is kind enough to mention this to you (if you selected Verbose mode). | ||
- | * Then, you will need to provide a new IP address. I'm quite proud of this function, but I'll be the first to admit it is not able to guess an IP address for you. I know, I know... | + | * Then, you will need to provide a new IP address. I'm quite proud of this function, but I'll be the first to admit it is not able to guess an IP address for you. I know, I know… |
* You can disable DHCP on the NIC by setting the parameter // | * You can disable DHCP on the NIC by setting the parameter // | ||
* You can also disable DNS registration for the NIC. Normally, you wouldn' | * You can also disable DNS registration for the NIC. Normally, you wouldn' | ||
- | * A DNS server. This is where the function will attempt to connect and clean up the old IP address. If one is not provided, it will attempt to do this on the DC your computer is logged on to. Normally, the DCs are DNS servers, too. If they are not DNS servers in your environment, | + | * A DNS server. This is where the function will attempt to connect and clean up the old IP address. If one is not provided, it will attempt to do this on the DC your computer is logged on to. Normally, the DCs are DNS servers, too. If they are not DNS servers in your environment, |
You can get more information by using //Get-Help Update-IPv4Address// | You can get more information by using //Get-Help Update-IPv4Address// | ||
Line 175: | Line 176: | ||
* Disable DNS registration (if prompted to do so). Of course, if you omitted this or mentioned that you wanted DNS registration, | * Disable DNS registration (if prompted to do so). Of course, if you omitted this or mentioned that you wanted DNS registration, | ||
* Remove the old IP address(es) from the specified NIC on the target computer. If Verbose mode is selected, you will be informed about these old addresses, too. | * Remove the old IP address(es) from the specified NIC on the target computer. If Verbose mode is selected, you will be informed about these old addresses, too. | ||
+ | |||
+ | \\ | ||