Windows Active Directory DCpromo answer file

4 03 2008

The following example will help you to quickly provision an Active Directory domain in vm or other lab environments. The provision of domain controller can be controlled and reproduced same way as before.  Copy the text below and create new text file named ad.txt.  

[DCInstall]
AdministratorPassword =P@SSWORD1
CreateOrJoin = Create
DomainNetBiosName = 70-296
NewDomainDNSName = 70-296.net
RebootOnSuccess = Yes
ReplicaOrNewDomain = Domain
SiteName = “Default-First-Site”
InstallDNS=yes
ConfirmGc=Yes
TreeOrChild = Tree
UserName=Administrator
Password=P@SSWORD1

Review the local administrator password and open a cmd shell on your Windows Server. Run dcpromo /answer:ad.txt. In the example answer file I automatically install the DNS server; make sure the Windows Server source cd-rom is available locally or in a cd drive.

For more options go to http://support.microsoft.com/kb/223757/en-us or  http://www.petri.co.il/unattended_installation_of_active_directory.htm.

After the reboot and logon with Domain Administrator account I verify the installation with ADUC (dsa.msc) console.

image

The Active Directory domain was successfully installed. Using the answer file I am able to redo my lab environments and prepare myself for production deployments.



Install Windows Server 2003 DHCP Server Service with Script

19 01 2008

Running the VMNet8 NAT network in VMWare Workstation does not provide me the granular control how the DHCP server should deal with different DHCP clients and options I want to see in my lab environment. As sysadmin I like to script things and re-use the code next time I will need to it.

How to install the DHCP service from script?

  • Create new file named c:\dhcp_server.txt

[NetOptionalComponents]

DHCPServer =1

  • Save the file and open a cmd box.
  • Execute sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\dhcp_server.txt

image 

For additional components go to here.



XML Report of Windows EventViewer Security EventID 529

4 07 2007

The following command within LogParser.exe will query Windows NT Securiy log with EventID 529 and parse the data into %computername%_security_logons_failed_529.xml.

LogParser “SELECT TimeGenerated AS LogonDate, EXTRACT_TOKEN(Strings, 0, ‘|’)AS Username,EXTRACT_TOKEN(Strings, 3, ‘|’)AS LogonType,EXTRACT_TOKEN(Strings, 4, ‘|’)AS LogonProcess, EXTRACT_TOKEN(Strings, 11, ‘|’)AS Source INTO %computername%_security_logons_failed_529.xml FROM Security WHERE EventID = 529″

Read the rest of this entry »