System Center Essentials and SQL Server

Since I have been monitoring my System Center Essentials and SQL server through Virtual Machine Manager, I’ve noticed that my server has been using all of the 6GB of allotted RAM.  Once I did some digging I found some great information about assigning SQL a minimum and maximum amount of RAM.  Mine was set at a ridiculous amount, more than I had, or ever will have. So, here was my fix.

First, I would recommend verifying the amount of memory being utilized, and this is a great article to do so.

After running those tests I went onto the following.

I opened SQL Server Manager and right clicked on the database and selected preferences (at the bottom).

From there you get “Server Properties” and I selected “Memory” on the right side.

Edit the “Minimum server Memory (in MB)” and the “Maximum server memory (in MB)”

Once this is done, make sure you restart the server or the SQL Service running in the Services MMC.

Finally, everything on my end seems to be working okay.  The memory usage of the Virtual Server seemed to drop almost immediately, which saved me from a restart to troubleshoot adjusting the RAM.

Time

Over the past couple of days I have noticed that our time on our computers just keeps getting further and further off. I noticed that our Domain Controller had the incorrect time, so, after doing some research I found a nice solution:

1. Locate the PDC Server.

2. In CMD type C:\net stop w32time

3. To configure the server to and external source type: C:\w32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org, 1.pool.ntp.org”

4. Once this command completes, type : C:\w32tm /config /reliable:yes

5. Start the Windows Time Service: net start w32time

Still trying to figure out how to get the computers to point back to the PDC, currently they are pointing to another Domain Controller.

After much battle with my time sync issue, I have finally found the solution.  Since I’ve been working on it for over a week, the solution was needed.

Anyway, our current configuration is 2 DC’s running on a seperate Hyper-V hosts, and one DC running on an ESXi host.  Little did I know that there is a setting on both VMware and Hyper-V that syncs the time with the Hosts.  Once the servers were individually shutdown and the setting changed, the commands above work great.  Syncing the time with the external servers.

AD CS Migration

Recently I was tasked with rebuilding or migrating our Certificate Authority to a new server. The previous server was 8 years old and was holding some pretty critical information.  Some of which was a Domain Controller, Certificate Authority, Email, Public Folders, Share Folders, and some Printers.  Since our Public Folders were not replicating, that was the first priority.  I solved that by changing the IIS port that was configured, once that was solved, the Public Folders took off.

Second challenge was to build a new or migrate our current Certificate Authority.  After working on building a new Certificate Authority, I found it to be easiest to go ahead and migrate the CA.  In order to do that the server must be the same name as the one that you are taking it off of.  This requires some configuration changes that get a little challenging if not properly planned out.  This post helped me out the most and got me through all of the configurations and keep moving.

The next problem that I encountered was that I needed to make the CA a domain controller.  You can’t dcpromo.exe with the CA installed, causing it to fail.  Therefore, I had to uninstall the role of the CA then dcpromo.  After that I reinstalled the role of CA, and everything stayed in place, except for importing the certificates.

Removing Linux Bootloader on Windows 7

After installing Linux, on my personal machine, I realized I don’t use it very much, or at all. So, I wanted it gone. A few months ago I tried to just delete the partition and go on, but the bootloader flipped out and wouldn’t let me even boot into Windows. So, I had to manually put in the CD and re-install Fedora to get everything to even load.

Finally I just gave up on the task, until last night it really just pissed me off. So, today at work I decided I would give it another shot. I found this article (http://www.lukeaddison.com/removing-linux-grub-restoring-windows-7-boot-gui/) and it helped me out a lot.

The only thing that didn’t work for me, and I noticed it in a comment, is that after booting from the Windows DVD, and entering into the command line I needed to run:

bootsect /nt60 c: /mbr

and reboot.

That did the trick for me, now everything boots wonderfully. I’m back to removing Linux and plan on installing it as a virtual machine just to make sure that doesn’t happen again.

DHCP Reservations

During the build of a new Domain Controller that has DHCP enabled I was wondering how I can get the DHCP reservations off the old server to the new server.  I stumbled upon this set of commands that saved my life.

On the existing (old) server:

netsh dhcp server export C:\dhcp.txt all

Copy the txt file to the new server, and run this command.

On the new server:

netsh dhcp server import C:\dhcp.txt

Seems to work great, and saved me a ton of time.

PowerShell – Defragment

Windows Server 2008 R2 has a built in Scheduled Task that defragments your hard drive sometime over night.  But, I was wondering if this is actually working, and on one server I have found it isn’t.

So, here is my PS script that I’m working on.  This is also my first “real” PowerShell script I’ve written.  It took me some time!

foreach ($computerName in Get-Content “C:\Users\matt.ladd\Desktop\Scripts\Servers.txt”) {

Write-Host $computerName

$drive = Get-WmiObject -computerName $computerName -Class Win32_Volume -Filter “DriveLetter = ‘C:'”

$report = $drive.DefragAnalysis()

$frag = $report.DefragAnalysis

$frag | Select-Object FilePercentFragmentation | Format-List

}

This will return the Fragmentation percentage as well as the computer name.

Still working on a text file with server names to read from.  Also, the plan is to send that to myself once a week in a .csv format.

DNS Meltdown

Recently we upgraded to Hyper-V. Everything was working great, until Friday.

I had just installed Windows Updates for August, and was going through and restarting our two domain controllers (on separate hosts), one at a time. Which probably shouldn’t be done during the day, but I’ve NEVER had problems with it before.

Well, after one restarted, and I logged in, I restarted the second one. Which restarted with any problems, until my Hyper-V host said that the management console couldn’t reach the host. Then it all fell apart. With both of the domain controllers down, nothing could resolve their IP addresses, nothing could get DHCP addresses, and no one could authenticate. Luckily for me, I had configured a domain controller on the side that was Server 2003, with just Active Directory installed.

The challenge was that I couldn’t get into that computer because it was taking forever to turn on because of not being able to get the proper addresses. Once that server came up, I ended up logging into it, and configuring DHCP and DNS. Which was a huge challenge for me because I’m not as comfortable with 2003 as I am with 2008. There were a few configuration issues that I had.

Once the configuration issues were worked out everything was changed over to the new domain controller, which is now running DHCP and DNS. Overall, it was a good learning experience, but I don’t plan on doing it again.

It could have been much worse than it was.