A small introduction to how you can administer IIS through powershell, to automate your processes in setting up web-applications, removing them, recycling your application pools and more.
Getting started:
First, you need either IIS 7.5 , or if you are running on an earlier version, you need to download and install the IIS Powershell Snap-in [...]
Changing the network location in Windows 7 is nearly impossible from the GUI.
Using the GPEdit and enabling the policy doesn’t help much for Local connections that has no name.
I’ve created the following script to force all NIC interfaces to a “work profile” (category 1).
Use on your own risk:
* Start powershell
[...]
I created a neat little extension for creating dialogs in MVC3 using Twitter bootstrap in order to make the whole process a little bit more flexible and easier to use.
// Bootstrap (Add this to the end of your file) (function ($, undefined) { $.ajaxSetup({ cache: false }); $(".openModalDialog").live("click", function (e) { e.preventDefault(); var [...]
The payex API is awfull to work with by default. Also, theres a lot of boiler plate coding and parsing you need to handle that can be rather boring. In order to make this process more barable
I created a neat little framework wrapping the payex framework into something that is easy to work with [...]
I recently installed MVCMailer and configured a couple of emails for sending.
However, when trying to run it I got a Object Not set reference (Nullreference) when populating the body.
The exception trace pointed me to a method get_remoteIp() in the Framework.
There were basically no clues on what failed apart from this. After disassembling the [...]
I recently had to merge all the javascript files to a single file in order to reduce the number of HTTPRequests to the webserver and minimize the load time.
The project was containing quite the few CSS files that should be merged.
Since it’s a production server, I could optimize this further by removing all [...]
Some people relies on the HttpContext.Current.Session to be present and uses this in their code. While this is a bad practice, it could however be useful to write automated tests for code using the HttpContext.Current.Session.
How to do it however, is not a trivial tasks. But, adding some reflection to your TestInitialize and you have [...]
There are a couple of ways to execute SQL through Powershell.
Most of the methods I’ve seen refers to loading the right assemblies, constructing and settings the command object and / or using the dataadapter. This is cumbersome and requires a lot of boilerplate scripting. However, there’s an easier, untold way to do it.
SQLPS [...]
I’ve recently had to do sysadmin work (again). And by sysadmin job I mean parsing through a lot of logs looking for patterns. This is rather dull. But, why not have some fun meanwhile;)
I wrote this neat little function to just do that (from Powershell):
I called the method Get-Logs, and you can use [...]
Often it’s useful to perform batch operations on a set of files matching some criteria.
Some usages:
Move (and delete) old logs Make backups of all new files Scan files for patterns
The sample script below can be used to do just that. Using the Get-ChildItem with recurse and filter allows you to get a [...]
Tags
.net Active Directory AD Administration ASP.NET Automation C# Captiva Capture Flow CaptureFlow Credentials Documentum Dql earthquake ECM Email EMC IIS Information Management Inputaccel JQuery MVC3 Outgoing email Passwords Powershell Productivity PSRemoting quake Roots2011 Rootsconf Safecontrols Scripting SecureString Sharepoint Sharepoint .net C# SVN Talk Users Virtualbox WCF Webpart Webservices Windows wp7 WPF

