AD .NET - User's Can't Change Password Attribute (Get/Set)

The following is an example on how to read a user's Can't Change Password attribute in Active Directory using C#. public bool GetCantChangePassword(string userid) { bool cantChange = false; try { DirectoryEntry entry = new DirectoryEntry(string.Format("LDAP://{0},{1}", "OU=Standard Users,OU=Domain", "DC=domain,DC=org")); entry.AuthenticationType = AuthenticationTypes.…

Minecraft Linux Servers - Automated Commands using Screen & Cron

The following is for Minecraft Server administrators running Linux. If you run your Minecraft server through a named screen session, you can develop simple bash scripts that automate commands. This can be everything from giftbag scripts to automated backups. An example backup script: /home/user/minecraft/backup.sh #!/bin/sh…

Exchange 2010 - Enable Mailbox through C# & PowerShell

The following is an example on how to use C# to create exchange mailboxes for Exchange 2010 using remote PowerShell. Imports, not all are used in the example function below: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.DirectoryServices; using System.EnterpriseServices; using System.…