Re: Setting value - works on W2k3 but not W2K
- From: Gerry Hickman <gerry666uk@xxxxxxxxxxx>
- Date: Fri, 03 Mar 2006 16:41:55 +0000
Hi,
I'm not aware of FullDNSRegistrationEnabled or SetDynamicDNSRegistration() being available on NICs under Win2k. Which tick box in the GUI do these settings relate to? Where does it say they exist on Win2k?
As I understand it, D-DNS is enabled by default on Win2k, so what makes you think it's not enabled? Are you getting DNSAPI warnings in the Event logs?
Eric v.s. wrote:
Hello,
I have been tasked with modifying Automatic DNS registration for all servers in our environment. Using several scripts that I have found here I've put together the following work in progress... which works with w2k3 but not w2k servers. Although the notes from each of the parts that I borrowed state that they work with both versions.
At this time my presumption is that it is because I am trying to change it remotely. i.e. I'm executing the following script from my test domain controller against three w2k and three w2k3 test servers.
My other presumption is that I'm using the wrong 'set' value. If that is the case for w2k would you please be so kind to recommend a different value.
thanks,
eric
-------------------------------------------------------------------------
'Created by: icvansed
'date created: 12/22/05
'date modified: 1/9/06
'purpose: get list of computers in AD, get pertinent settings, output settings, modify settings and then re-output
'On Error Resume Next
Const ADS_SCOPE_SUBTREE = 2
Const FULL_DNS_REGISTRATION = False
Const DOMAIN_DNS_REGISTRATION = False
Set fso = CreateObject("Scripting.FileSystemObject")
set fred = fso.CreateTextFile("d:\temp\output.txt",True)
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCOmmand.ActiveConnection = objConnection
objCommand.CommandText = _
"Select Name, Location from 'LDAP://OU=test,ou=servers,DC=test,DC=com' " _
& "Where objectClass='computer'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
'Read settings and output to text file
Do Until objRecordSet.EOF
strComputer = objRecordSet.Fields("Name").Value
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
fred.writeline "Computer Name: " & strComputer
fred.writeline "Time: " & now
For each objnetcard in colnetcards
fred.writeline "DNSRegistration for MAC " & objnetcard.MACAddress & ": " & objnetcard.FullDNSRegistrationEnabled
objNetCard.SetDynamicDNSRegistration FULL_DNS_REGISTRATION, DOMAIN_DNS_REGISTRATION
next
objRecordSet.MoveNext
Loop
fred.close
--
Gerry Hickman (London UK)
.
- Prev by Date: Re: local security policy via wmi
- Next by Date: Re: converting VBscript to c
- Previous by thread: Re: local security policy via wmi
- Next by thread: Re: converting VBscript to c
- Index(es):
Relevant Pages
|