Microsoft WebMatrix and Microsoft WebPlatform Installer

Microsoft WebMatrixFor a project at KTSI we needed a platform to quick deploy PHP and MySQL applications. There are a lot of solutions out there in the web, for example XAMPP. After testing some options I had a closer look at the Microsoft WebPlatform Installer and Microsoft WebMatrix. Those two tools do exactly what I need. With the WebPlatform Installer you can easily install a local instance of IIS Express with ASP.NET, PHP, MSSQL and MySQL support with in 5-10 minutes.

But the coolest tool in my opinion is WebMatrix. Webmatrix lets developers create, manage and deploy Web Applications very very easy. And if you need to to more Webmatrix lets you also work with Visual Studio on the same project.

Windows Server 2008 R2 Hyper-V Licensing Overview

hyper-v

This is a little Overview how you can license Windows Server 2008 R2 in a Hyper-V Environment. One of the biggest advantages  of Hyper-V over VMware are the included Guest OS Licenses. For example if you buy a Windows Server 2008 R2 Datacenter license (of each CPU of your physical Server) you can deploy unlimited Windows Server 2008 R2 Datacenter Virtual Machines on this Host.

This Overview should help you understand how this works.

License License models Physical Virtual
Windows Server 2008 R2 Foundation Server License 1 0
Windows Server 2008 R2 Standard Server + CAL
Processor or SAL
1 1
Windows Server 2008 R2 Enterprise Server + CAL
Processor or SAL
1 4
Windows Server 2008 R2 Datacenter Processor + CAL 1 unlimited
Windows Server 2008 R2 for Itanium-Based Systems Processor + CAL 1 unlimited
Windows Web Server 2008 R2 Server License 1 0 (or 1)
Hyper-V Server 2008 R2 Free 1 0

 

If you need more infos you can find this here.

Powershell: Send Tweet

Powershell Header

For some reason your Powershell script should send a Tweet. With this function Powershell will send a message to Twitter.

function Send-Tweet($Message)
{
#Twitter Login
$Twitter_UserName = "yourname"
$Twitter_Password = "yourpassword"
$Twitter_URL = "https://twitter.com/statuses/update.xml?status="

$Twitter_Request = [System.Net.WebRequest]::Create($Twitter_URL + $Message)
$Twitter_Request.credentials= New-Object System.Net.NetworkCredential($Twitter_UserName,$Twitter_Password)
$Twitter_Request.method= "POST"
$Twitter_Request.contentType = "application/x-www-form-urlencoded"
$Twitter_Request.GetResponse().statusCode # return the status code of the request
}

You can now call this function and add a message

Send-Tweet "This is my first Tweet from Powershell"

Twitter

If you need a interactive script you can simply use this (seen by Bhargav’s IT Playground)

function Send-Tweet($Message,$UserName){
if($Message-eq$null){$Message=Read-Host"Enter your tweet"}
if($Username-eq$null){$Username=read-host"Enter your twitter username"}
if($Password-eq$null)
{
$Password=read-host-assecurestring"Enter your twitter password"
$marshal=[Runtime.InteropServices.Marshal]
$Password=$marshal::PtrToStringAuto($marshal::SecureStringToBSTR($Password))
}
$url="https://twitter.com/statuses/update.xml?status=$Message"
$request=[System.Net.WebRequest]::Create($url)
$request.credentials=New-Object System.Net.NetworkCredential($UserName,$Password)
$request.method="POST"
$request.contentType ="application/x-www-form-urlencoded"
$request.GetResponse().statusCode # return the status code of the request}