iT邦幫忙

0

請問如何同時更換OA區多台電腦的DNS

dns
  • 分享至 

  • twitterImage

我有一個問題:

如果要更改一台DNS沒問題。但是如果是要同時改相同網域下的多台電腦DNS要怎麼做呢?

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

2
jeles51
iT邦研究生 3 級 ‧ 2017-11-15 11:20:27
最佳解答

利用GPO:
1.寫個 change_dns.cmd

netsh interface ipv4 set dnsservers name="乙太網路" static 8.8.8.8 primary
netsh interface ipv4 add dnsservers name="乙太網路" 8.8.4.4 index=2

2.在GPO放到登入執行檔即可.
(GPMC\使用者設定\原則\Windows設定\指令碼\登入)

PS.name值 在W7或W10名稱可能不同,W7可能叫做"區域連線".

看更多先前的回應...收起先前的回應...

那辦公室電腦win7跟win10都有,怎辦?

jeles51 iT邦研究生 3 級 ‧ 2017-11-15 12:07:22 檢舉

簡單作法,設2個CMD,因為 只要name找不到就不會套上.

正確作法,寫2條規則及2個WMI篩選器,分別W7及W10,
W7規則套W7 computer,W10規則套w10 computer

重點提示:
w7 computer
select * from Win32_OperatingSystem where (Version like "6.1%")

w10 computer
select * from Win32_OperatingSystem where (Version like "10.0%")

可參考:
https://thiagobeier.wordpress.com/2017/02/03/wmi-filters-on-windows-7-and-windows-case-sensitive/

想請問最後提示的二個是代表什麼意思?

jeles51 iT邦研究生 3 級 ‧ 2017-12-07 11:40:06 檢舉

我要發表回答

立即登入回答