Showing posts with label Windows Server Admin. Show all posts
Showing posts with label Windows Server Admin. Show all posts

Friday, January 22, 2016

Remove Password Change Requirement in AD

For test AD environment, it is often convenient to disable the default password requirements such as minimum length, expiration days, etc. Here's a quick cheat sheet on how to do it.


  1. Remote in to Domain Controller
  2. Run "Group Policy Management"
    1. Expand Forest, Domains and your AD domain
    2. Right-click the "Default Domain Policy" and select "Edit"
    3. Group Policy Management Editor appears.
      1. Expand Computer Configuration
      2. Expand Policies
      3. Expand Windows Settings
      4. Expand Security Settings
      5. Expand Account Policies
      6. Select Password Policy
        1. Enable policies with 0 values as needed in the right pane.
      7. Select Account Lockout Policy
        1. Make changes as needed.
  3. On Windows 2012 or later
    1. Use Powershell command "Invoke-GPUpdate"
  4. On Windows 2008 or earlier
    1. Use command "gpupdate /force"

Sunday, September 6, 2015

.NET optimization service at very high CPU utilization

On Server 2012 R2, after running Windows Update to install important updates, the CPU utilization of the server could get pegged at 100% due to .NET optimization service (Ngen.exe).

As the name suggests, all installed .NET frameworks are being optimized via re-compiling, which leads to a prolonged period of 100% CPU usage.

Run the following if you want to get this optimization process over with at your command. Run it and come back after a while (10~20 min). When it is done, the server should behave normally.

 Get-ChildItem $env:SystemRoot\Microsoft.net\NGen.exe -recurse | ForEach-Object { & $_ executeQueuedItems }


Basically, the command above lets us to run "Ngen.exe  executeQueuedItems" per each .NET Framework versions manually at the time of our choosing, rather than letting the server finish when it can later, which may cause unexpected slowness in performance.

After optimization is done for each .NET Framework version, when running the command again, you will see confirmation message like below.