Archive

Posts Tagged ‘Windows Server’

The Active Directory integrated DNS zone _msdcs.domain.com was not found

November 22, 2016 Leave a comment

I did not discover this fix. I found this from TechNet forums but have since lost the link.

The fix below helped me resolve this problem.

Problem:
The Active Directory integrated DNS zone _msdcs.domain.com was not found.

Solution:

  • Create a zone called "_msdcs.domain.com"
  • Make it AD integrated
  • Allow secure only updates and Click Finish
  • Go back into the zone properties
  • Change the replication scope to "All DCs in the Forest"
  • Delete the _msdcs folder under domain.com
  • Run an ipconfig /registerdns
  • stop netlogon
  • start netlogon
  • The SRVs should populate shortly, if they already haven’t

Credit goes to users on TechNet Forums.

-Eric

Advertisements

Zabbix Action to Start a Windows Service

March 21, 2016 Leave a comment

Using zabbix to restrart a service, when it unexpectedly stopped running

  1. Create a template for the custom service.
  2. Use the trigger to monitor the service and report the problem
  3. In the Zabbix Agent config allow remote commands
  4. Create an action to start the service

Create an action to start the service:

  • Click on Configuration > Actions > click Create action (top right corner) > Enter Action name and leave rest as default
  • Click on Conditions tab > Leave condition label (A) > remove any other conditions 
  • Conditions tab > add a new Trigger condition (Like so: Trigger = select the trigger created for the service (by clicking select)) > click Add to add the new condition
  • Click on Operations tab > Change Operation type to “Remote command” > Enter new Target as current host > Type equals ‘Custom script’ > Execute equals ‘Zabbix agent’ >  enter Command “sc \\{HOST.NAME} start ServiceName” > click Add to add the new reactive action and save the configuration
    To test this, turn of the service and wait for a few seconds to see if it has been started.

-Eric

Windows Time config for Active Directory

March 20, 2016 Leave a comment

Small list of quick windows time service commands

  • w32tm /query /peers
  • net stop w32time
  • net start w32time
  • w32tm /config /manualpeerlist:"0.uk.pool.ntp.org,0x1 1.uk.pool.ntp.org,0x1 2.uk.pool.ntp.org,0x1 time.windows.com,0x1" /syncfromflags:manual /update /reliable:yes

Here’s a full article how Windows Time Service works – Link

Windows Server 64-bit recommended page file size

March 19, 2016 Leave a comment

I picked this up a while back when I was doing research for my RDS cluster.

Recommended page file sizes:

  • Windows Server 2008 R2:
    Minimum page file size: 1x RAM
    Maximum page file size: 3 x RAM or 4 GB, whichever is larger
  • Windows Server 2012 and R2:
    Minimum page file size: Depends on crash dump setting*
    Maximum page file size: 3 x RAM or 4 GB, whichever is larger

    More Info: Technet

I found this from a forum on the internet:

For WS 2008/R2, C drive 66 GB irrespective of OS version and platform. C drive should have 6GB page file.

Aforementioned are basic requirements.

As best practice, you need to set page file 1.5 Times the RAM available on any Windows Servers.

For instance,

Say, you have 16 GB RAM on a server, 1.5 times the RAM 16 GB = 24 GB;  you need to set 24 GB Page file on the Server.

Now, how would you ditribute the page file ?

Here is the way, You need create a separate Drive and split the Page file (other than the preset page file on C drive)

For WS 2008/2, C drive already has 6 GB, now on a newly created drive set 18 GB page file (i.e. 24 -6=18 GB), make sure you have at least 23 – 25 GB Drive to accomodate 18GB page file.

I use the above settings on my RDS servers.

-Eric

NTP Event ID 142 with a possible fix for Win2008R2 DC

March 12, 2016 Leave a comment

Please make sure that port 123 (UDP) is open between the DC (with a problem) and PDCEmulator.

Then run the following commands on the DC (with the issue):

  • net stop w32time
  • w32tm /unregister
  • w32tm /register
  • net start w32time
  • w32tm /config /syncfromflags:domhier /update

Now run again these commands:

  • net stop w32time
  • net start w32time

Wait and then check the event viewer again.

Here is the AD and AD Domain Services Port Requirements list – LINK

My thanks to Meinolf Weber from Technet forums.

-Eric

Netsh Commands for Interface & Route Commands

March 11, 2016 Leave a comment

Netsh Commands:

netsh interface ip show config
netsh interface ip set address name=”Local Area Connection” static 192.168.0.100 255.255.255.0 192.168.0.1 1
netsh interface ip set dns name=”Local Area Connection” static 192.168.1.1
netsh interface ip add dns name=”Local Area Connection” 192.168.1.1

Routes & Persistent Routes commands:

Network Address Netmask Gateway Address Metric

192.168.1.100 255.255.255.0 192.168.1.1  2

Example commands:

  • route print
  • route delete
  • route add 192.168.1.100 mask 255.255.255.0 192.168.1.1 metric 2
  • route -p add 192.168.1.100 mask 255.255.255.0 192.168.1.1 metric 2

-Eric

Powershell Command to list AD users and export to CSV

May 6, 2015 Leave a comment

A quick PowerShell command to get a list of all the Active Directory User objects, showing only phone numbers and exporting it to CSV. In the example below showing user names and phone numbers.

Get-ADUser -filter * -Properties * | select Name, SamAccountName, telephoneNumber, Mobile, IPphone | Export-csv C:\Temp\Phones.csv

-Eric