
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2019 02:30 PM
If I run the same command on 10 machines, most will fail. Maybe 1 or 2 will pass. Then I run the exact same command again, and 2-3 more will pass. I run it again and usually the rest will pass. If I run a deployment on 100-200 machines at once, they all seem to fail. All the same commands and creds used. Here is what I used:
@ECHO OFF
set vardns1=XX.XX.XX.XX
set vardns2=XX.XX.XX.XX
ECHO Setting Primary DNS
netsh int ip set dns name = "Ethernet" source = static addr = %vardns1%
ECHO Setting Secondary DNS
netsh int ip add dns name = "Ethernet" addr = %vardns2%
ipconfig /flushdns
exit
@ECHO OFF
set vardns1=XX.XX.XX.XX
set vardns2=XX.XX.XX.XX
ECHO Setting Primary DNS
netsh int ip set dns name = "Ethernet" source = static addr = %vardns1%
ECHO Setting Secondary DNS
netsh int ip add dns name = "Ethernet" addr = %vardns2%
ipconfig /flushdns
exit
Labels:
- Labels:
-
General Discussion
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2019 03:07 PM
nope, they are not. Most are. I was running 1 script with the name "Local Area Connection" and another with "Ethernet". But I was trying to find out if I could use a variable like "$Ethernet$" Not sure if that would work in netsh....

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2019 02:56 PM
oh - i just realized - are all the adapters named 'ethernet' ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2019 02:52 PM
Have you verified that the machines that report failed, indeed failed (i.e. rescan the asset and see what the DNS entries are in the network section of the asset)?
I find when I mess with the IPconfig in a deployment script, that it messes with the return of the success code of the script...
I find when I mess with the IPconfig in a deployment script, that it messes with the return of the success code of the script...
