Tag Archives: 2008 r2

Scripting DHCP server deployments using netsh in Windows Server 2008 R2

Windows_Server_2008_R2_Logo

Another quick post to show how you can quickly deploy fully working DHCP server with multiple scopes in a matter of seconds. In my case it was a single server with 90 very different scopes and doing this manually would be just soo boring and long that’s unreal. Unfortunately Windows Server 2012 wasn’t an option so no PowerShell love but Windows Server 2008 R2 is still pretty decent and using netsh wasn’t as painful as it seemed. To get us started we need to install the DHCP Server role and start the required service (dhcpserver):

Next step is to authorize DHCP server in the enterprise so we can actually use it to dish out IP addresses:

Other useful commands here would include:

To deauthorize the server –

and to list all authorized servers –

Continue reading

Windows Server 2008 R2 SP1 – How to Sync Time from External Time Source?

Windows_Server_2008_R2_Logo

Quick post to show how you can sync your domain controllers with external time source (time.windows.com or ntp.pool.org for example). By default, all machines in the domain will sync time from the domain controller which is the internal time server – if you have more than one DC then time will sync from the DC that holds the PDC emulator FSMO role. To check which DC is PDC emulator in your domain you need to run netdom /query fsmo command like so:

Windows_Server_2008_R2_SP1_How_to_Sync_Time_to_External_Time_Source_1

Once PDC emulator role is established there is few commands we need to run in order for time to sync, these are (run on PDC emulator):

Continue reading