Exchange: Content index state failed

If you ever had problems with corrupt databases in an Exchange 2010 DAG setup you might have encountered this error. Trying to activate the database on a server where it has this state will fail. However there is a quite simple fix given that you have a healthy copy of the database on a different server: Update-MailboxDatabaseCopy -Identity DB -SourceServer -CatalogOnly Run the command in the Exchange Management Shell and it should fix the Content index state and allow you to activate the database again....

January 16, 2013 · nerenther

Exchange: Activate Database Copy fails

After some exchange services failed on one of the nodes in our Exchange 2010 DAG we got some problems with one database. The database was mounted on server2 where it has an activation preference of 2. Trying to manually activate the database on server1, where is has an activation preference of 1, resulted in the following error: ——————————————————– Microsoft Exchange Error ——————————————————– Cannot activate database copy ‘Activate Database Copy…'. Activate Database Copy…...

January 16, 2013 · nerenther

Resetting the Discretionary Access Control List (DACL) in a Windows Service security descriptor

OpenService FAILED 5: Access is denied. — “Oh crap!” If you ever see this error and need to reset the DACL on a Windows service, let’s say in case you (or someone else) accidentally deletes it, or configure it to something that prevents you from reading it’s security settings, this might do the trick: First of all, get a cup of coffee. Download PsExec (a tool in PsTools), which among other things allow you to run commands as the “local system” account....

January 14, 2013 · ricmik

Powershell: Checking multiple dns records for multiple domains

I don’t know how useful this will be for others, but in our case we had a need to check a few public dns records on some of our domains. Doing so by using a web portal will be time consuming and straight out boring. Luckily you can use Powershell for such things: First we need to to save our domains in an array: $domains = @("domainA.com", "domainB.com", "domainC.com") Then we send that array into a foreach loop:...

November 20, 2012 · nerenther

Powershell function for enabling a user for Lync and configure settings

A little while ago I posted a script for enabling users for Lync and settings some settings for that user. That script has been used here ever since I posted it and it has worked like a charm. However there’s always room for improvement, right?. So I have made a function out of it and for the first time (I think) I have even implemented some error handling. The function is also improved quit a bit on the help section and the info that is shown to the user after the function completes....

October 4, 2012 · nerenther

HP ACU cli quick guide

Guess what? It’s time for something different than powershell 😛 I finally got myself a server to play around with Hyper-V on. This has been sorely missed for a long time. I worked a lot with Hyper-V in my previous job, and even built a small data center running on Hyper-V. But at my current job we only use vmware, which is a great product but to expensive in my book....

October 3, 2012 · nerenther

SuperOffice and Citrix

I’m just gonna start by putting this out there: I have never been a fan of SuperOffice, and I probably never will be either. Now that thats out there, heres the situation: We have one citrix farm, and three different SuperOffice instances. The goal with our citrix farm is to have each citrix server completely the same as the others. Because of that, only one of the SuperOffice instance have been accessible from the citrix farm....

September 18, 2012 · nerenther

Powershell function for gathering users in groups

A friend of mine asked me a couple of days ago if I knew a way to gather users who are members of given groups. I thought to myself “Hmm, challenge accepted!” and started writing a small powershell script. After he confirmed that the script worked as planned I decided to make a function of it (Yes, I know it has been a lot of them on this blog lately)....

September 13, 2012 · nerenther

Motivational Powershell function

If you are ever in need of some motivation, here is a very simple Powershell function for that: function Motivate-Me { $motivator = Get-Random -Minimum 1 -Maximum 5 if ($motivator -eq 1) {Write-Host "You are a Powershell God!"} if ($motivator -eq 2) {Write-Host "You rule dude!"} if ($motivator -eq 3) {Write-Host "I wish I could errorhandle like you"} if ($motivator -eq 4) {Write-Host "I am nothing compared to you"} if ($motivator -eq 5) {Write-Host "Are you sure you intirely human?...

September 12, 2012 · nerenther

Powershell function for showing some system information

This is a function I created just because I wanted to toy around with Powershell and get-wmiobject. Also, this is my first function where I made it possible to use a switch parameter. What the function does is gather some system information using get-wmiobject. The info is written to a temp file and then shown using out-gridview. If the KeepTempFile parameter is used the temp file is saved in the users profile, if not it is deleted after the function finishes....

September 12, 2012 · nerenther