Cake Build Script - Node, Gulp, .NET Core MSBuild

The following is a basic guide for setting up a Cake build script to work with a project that utilizes .NET Core, Node.JS, and Gulp. This build script can be used with various continuous integration setups to assist with automated builds and deployments of code. Requirements: * .NET Core SDK…

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

I've managed to get Mono [http://www.mono-project.com/] (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 Settings Required References (Copy Local: True): * System.Web.Mvc * System.Web.…

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! ///

/// Returns a domain controller from the specified domain /// /// The domain…

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

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