Buy Me a Coffee

Buy Me a Coffee!

Thursday, July 31, 2014

CDN for Everyone, Except SharePoint

CloudFlare is a great CDN to use for your personal sites.  It helps make your site run faster, and protects you from hacking.  The only problem is that the reverse proxy mucks with SharePoint in a very bad way.  I haven't tracked the issue down, but I have felt the pain.

Tuesday, July 29, 2014

Free Server 2012 R2 Hyper-V

So am I the last to know that Microsoft is offering Microsoft Server 2012 R2 Core running Hyper-V for free?  It has been a while since I did any Hyper-V work, but the new incarnation is pretty awesome!  The free version offers the same level of functionality as the full versions, just without the full OS running outside of it.  You get the same scaling, live migration, DR-redundancy, and clustering.  It really makes me want to build a server to try it on. ;-)

Using the Where-Object in Powershell

Earlier I posted some scripts that I use with my Hyper-V instances to reduce clicking and mentioned filtering.  To Filter, just use a Where-Object like so:

Get-VM | Where-Object{$_.Name -Like "SQL*"} | Stop-VM

It makes the scripts from before more powerful, especially if you use some standard naming conventions for your lab VMs.  Technet has a good coverage of the parameters you can use in a Where-Object, but I mainly use the -Like comparison operator to match regular expressions.

Combine Azure and AutoSPSourceBuilder for the win!

Do you have a remote client and limited bandwidth at home?  Need to install SharePoint at the far end of a small pipe?  Want to be Made of Win?  Stand up an Azure VM and build your complete SharePoint installation source, including prerequisites and slip streamed updates using AutoSPSourceBuilder!  You can then zip up the (large) results and download it via a corporate pipe rather than wait the 9+ hours to upload it through your residential connection.  Bonus, install the Web Server (IIS) role on the VM and you can avoid issues with FTP.  Just make sure to do your downloading at night to not interfere with normal business Reddit browsing.

Scripting Hyper-V on Windows 8

I am working up a SharePoint farm in Hyper-V on my nifty new (and large) laptop and there are a few scripts that I use rather often.  I don't have any other VMs on my box, so they are non-discriminatory, but some simple naming conventions would allow extending them to respect labs.  Here they are:

PS D:\Lab Scripts> Get-VM | Stop-VM

PS D:\Lab Scripts> Get-VM | Checkpoint-VM -SnapshotName "Base"

PS D:\Lab Scripts> Get-VM | GET-VMSnapshot –Name "Base" | 
                            RESTORE-VMSnapshot –confirm:$False

PS D:\Lab Scripts> Get-VM | Start-VM

For a little more information about what is going on, Get-VM gets a list of the VMs on the machine and the pipe ( | ) passes the list as arguments to the next command.  I will leave the rest of the commands for you to look up, assuming they aren't perfectly obvious.

Wednesday, July 9, 2014

Changing the Subscription Name in Azure

When you set up your Windows Azure subscription and get ready to start scripting against it, you will probably find that the Subscription Name is something like "Windows Azure MSDN - Visual Studio Ultimate" or "Azure Free Trial". This isn't too bad, but once you start managing several subscriptions, you will need to differentiate them. It is pretty easy, just go to https://account.windowsazure.com/Subscriptions and click on the subscription you want to modify:
Then click on Edit subscription details:
And enter the name: