Category Archives: Windows

Powershell – Get-ADuser and output the homedrives to CSV file

I had a customer with around 27 file servers used as locations for AD home drives. We needed to do some analysis on which users used which server, as things like DFS or a strategy of where to place users were not in place. So PowerShell to the rescue.

A simple version of this script is;

get-aduser -Filter * -properties * | select DisplayName,Enabled,HomeDirectory,LastLogonDate,CanonicalName | Export-csv -path c:\scripts\userhomefolder.csv

I created this more complex script after the amount of unique objects exceeded the maximum filter within excel, so by splitting into a file per server fixed this.

First off, create an array with the multiple file servers, then used the “foreach” command to loop a PowerShell command with each file server name.

We look into all user’s in AD and output to a CSV file any users with file server X into a CSV file.

#Add the AD module into the Powershell session
Import-module ActiveDirectory

#Array containing each File Server, can be FQDN or short name
$fileservers = 'FS1','FS2','FS3'

#Loop to run a script for each object in the array against all AD users, outputs in CSV to C:\ folder
Foreach ($fileserver in $Fileservers)
get-aduser -Filter * -properties * | select DisplayName,Enabled,HomeDirectory,LastLogonDate,CanonicalName | Where {$_.HomeDirectory -like "*$fileserver*"} |Export-csv -path c:\scripts\userhomefolder2-$fileserver.csv





Citrix StoreFront – Creating a Public SSL Certificate

The latest versions of Citrix receiver require that you use HTTPS for the server bound connections, otherwise you cannot connect.

Citrix reciever https error

And the information on the Citrix website can be a bit thin when it comes to using a Public CA SSL Certificate. Here is the documentation link to using certificates for the Storefront component.

Here I am covering;

  • Workaround – Bypassing the HTTPS SSL warning when adding a store to Citrix Receiver
  • Creating the Public SSL Certificate request for your StoreFront Server
  • Importing the Public SSL Certificate onto your StoreFront Server
  • Exporting the SSL Certificate for use on additional servers
  • Linking the SSL Certificate in IIS to the StoreFront Website

Continue reading Citrix StoreFront – Creating a Public SSL Certificate

DCPromo Fails – The directory service is missing mandatory configuration information

On a Server 2008 R2 machine, I had an issue demoting from being a Domain Controller, after moving the FSMO roles onto a new machine. This was after a second domain controller died. I am not sure of the previous history of where the FSMO roles were for this client.

Two new DC’s were created and promoted, after cleaning up DNS to remove the old configuration of the dead DC.

The Error

I was provided with the following error in a dialog box and in the event log

Continue reading DCPromo Fails – The directory service is missing mandatory configuration information

Screen Capture Software of Choice – SnagIT

Everyone has their favourites, and mine is SnagIT. It’s not free, but it has such a great interface, I can’t face using anything else.

I use it for capturing shots of the environment, as it is now, and after I’ve changed it, and then annotating them with arrows and text.

The end result is either the shots are used for my client project documentation, or here on in the blog posts.

To show off some of the features, I am going to try to use SnagIT to capture itself.

SnagIT – The capturing side

So SnagIT is broke down into two parts, the capture side, and the editing of the captures.

We can do static images and video, with an in-depth editing of the static side, but little options for video.

So here’s the capture side, which is based around the use of profiles.


Continue reading Screen Capture Software of Choice – SnagIT

Profwiz: Migrating users profiles to a new domain

So a colleague of mine introduced me to this great tool, ForensiT User Profile Wizard.

We were migrating a customer from one domain to a new one, and there is a lot of data stored in the local profile of the users. So we needed a way to move this data into the new profile they will receive when the machine is moved into the new domain.

Note: This is about local machine profiles, and not those on a file server.

1. Login with existing domain\username on the machine, run the Profwiz.exe

  • Enter the new domain name
  • Enter the account name of the user on the name domain


Continue reading Profwiz: Migrating users profiles to a new domain