DevOps Monkey Goodness

Monthly archives for October, 2011

Implementing a Site Search For An MVC...

Implementing a Site Search For An MVC Website

I’m currently looking at implenting sitesearch for one of my client sites, I looked at a few options including Microsoft’s Search Server Express 2010 and a commercial solution from http://www.sitesearchasp.net. Here’s my results: Microsoft Site Search Express 2010 In a nutshell I a spent about half a day trying to get this working, don’t waste your […]

PowerShell Run Only Scripts That You ...

PowerShell Run Only Scripts That You Trust

This might catch some people out:  Downloading a ps1 file from the Internet and tring to execute results in error:   Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your computer. Do you want to run C:\Downloads\SetupEnterpriseSearch.ps1? Even with executionpoilcy set to unrestricted you’ll get this […]

Installing Search Server 2010 Without...

Installing Search Server 2010 Without a Domain Controller

Whilst looking at implementing a site search feature for one of my client sites I thought I’d look at Microsoft’s free Search Server 2010 Express to see if I can use it to crawl my MVC3 razor website that I’m working on.   First of all I’d try to install Search Server 2010 but quite […]

PowerShell Visual Studio Command Prom...

PowerShell Visual Studio Command Prompt

Finally decided today that I no longer want to use the DOS command prompt, PowerShell is the way to go for everything!  But when I do use the VS DOS prompt it’s normally because I want to use msbuild which means setting the correct envionment path.  A quick Google brings up some samples so I […]

How to Determine the Operating System...

How to Determine the Operating System With Powershell

It’s quite simple to find the name of the operating system with PowerShell.  The WMI cmdlet GetWmiObject contains a lot of useful information about the environment, there’s numerous ways to use the object but here’s one method: (Get-WmiObject Win32_OperatingSystem).name This should work straight away but for me I encounted some “weird” issues which suggested there […]

How To Find Blogs in Your Niche

How To Find Blogs in Your Niche

This can be useful if you’re looking for blogs in a certain niche: intitle:makeup intext:comment inurl:blog

How To Check Service Start Type and S...

How To Check Service Start Type and Set To Automatic With Powershell

As with most of my Windows 2008 administration scripts I prefer to only “touch” the system if it needs updating otherwise leave it alone.  The script below shows how to detect if a service is set to manual, change to automatic and start if required.  Oddly the Get-Service cmdlet doesn’t return the start type in PowerShell […]

Windows 2008 PowerShell Error Get-Win...

Windows 2008 PowerShell Error Get-WindowsFeature Failed to initialize.

I had a nice error on a Windows 2008 R2 server whilst trying to install some server roles/features with PowerShell: Import-Module servermanager Get-WindowsFeature Resulted in error: Get-WindowsFeature : Failed to initialize. At line:3 char:19 + Get-WindowsFeature <<<< + CategoryInfo : OperationStopped: (:) [Get-WindowsFeature], COMException + FullyQualifiedErrorId : DiscoveryFailed,Microsoft.Windows.ServerManager.Commands.GetWindowsFeatureCommand You might also see this error when […]

Enable Windows 2008 Features With Pow...

Enable Windows 2008 Features With Powershell

Here’s a PowerShell script that determines if the OS is Windows Server 2008 and enables a list of windows features.  To get a list of features and enabled status run Get-WindowsFeature (after importing the  servermanager module).   Import-Module servermanager function IsWindows2008(){ $operatingSystem = gwmi win32_operatingSystem | select name return $operatingSystem.name.contains(“Server 2008”) } function EnableWindowsFeatures($featureList) { foreach […]

Powershell Remoting Access is Denied

Powershell Remoting Access is Denied

Had an interesting one today whilst rebuilding a server and enabling WinRM, after running my scripts to enable Powershell Remoting I was able to remotley invoke-command by passing in my domain user which is a local admin sucessfully but when I tried the same thing using a local admin account I kept receiving: Connecting to remote […]