How to get ASP.NET MVC3 Working under Mono 2.10 (Ubuntu 12.10)

I've managed to get Mono (version 2.10.8.1) working with MVC3 in my Apache server through mod-mono and mono-server4. Update: Included a DirectoryMatch configuration for securing various ASP.net directories. Visual Studio Project SettingsRequired References (Copy Local: True): System.Web.MvcSystem.Web.HelpersSystem.Web.RoutingSystem.Web.RazorSystem.Web.…

Updating User Workstations through PowerShell

Below is a simple PowerShell script that can be used to search for all currently restricted accounts in Active Directory (accounts who have a value for userWorkstations), and update their list of workstations by adding/removing hosts as needed. This script might be most useful in a scenario where you…

C# and Remote PowerShell - Lookup Smallest Mailbox Database

The following example can be used to return the smallest available mailbox database with a given name pattern. This might be useful if you're running multiple mailbox databases with similar names: Database 1, Database 2, Database 3, etc.. You can pass in a search for "Database*" and it will find…

Using PowerShell to Retrieve DCs within a Specific Domain

The following example will use a remote PowerShell session to query a list of domain controllers under a domain name, and return the first result. Note: This does not verify that the domain controller is online and responding to queries! /// <summary> /// Returns a domain controller from the specified…

Exchange Remote PowerShell - PSLanguageMode to FullLanguage

How many developers have encountered the following errors when attempting to write remote PowerShell commands against Exchange? Function declarations are not allowed in restricted language mode or a Data section. Property references are not allowed in restricted language mode or a Data section. Assignment statements are not allowed in restricted…

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.…