creating a outlook signature with logo

The other week I was working at a customer and the requested that we rebuild the way they create their Outlook signature from the old word document template. And as we can use PowerShell for everything today that’s where we went. The problem with doing it this way is that the logo image was residing on a file share in their internal environment. This means as soon as the email is sent the image is not attached and the receiving end could not the their logo.

So to fix this there is a small registry value you can set to make sure outlook always includes images. You can also find the complete script here.

First off we need to create a folder structure cause the script has another feature which they requested. So create a folder and inside that folder place the script, your logo image file and create another folder inside named Pictures.

Like this:Folder

Open up the script and at the top of the script change two things, first change the name of the logo file to whatever your file is named and change the name of the signature to something fitting your environment. The name you type in here is the one that will show up if select a different signature in Outlook.

Next Check the bottom of the script there are two sections one being the registry settings to make sure to include the image and the other is a value to defined if the signature should be used by default. If you wish to use this just uncomment the lines creating each of the registry values.

Now just run the script!
That’s it to creating the signature. If you want to customize the look of the signature its a common html creation so pretty much anything is possible.

It should give you a signature looking something like this.


So how does it work? Well we start by getting the username of the current user and then do an AD query for that user and get the above values. This means that whatever is in Active Directory will be in the signature creating a streamlined and unified look for every person in your organization.

Once that is done it will get the logo picture and insert that as well. Next comes the nice extra feature with the Picture folder you created. All images you add in here will be added to the bottom of the signature. So now the question is why would you want that? Well a number of customers I work with like to add a banner at the end during certain times of the year or when they want to push a certain product or happening. Now it can be centrally controlled and all users will get it.

Just don’t forget to remove old pictures in the folder.

So to finish up, deployment!
To accomplish this I create a GPO than runs a login script. If you don’t want to do that you can always do a scheduled task that checks a certain network folder and runs the script or any other preferred solution.

Link to the script is here

Hope this helps and happy deploying!


Merge WIM into one – the space saver

I have gotten this question a couple of times “can i have two operating systems to choose from in one task sequence”. Well the correct answer to that is yes, but it takes up alot of unecessary space and if you are using ConfigMgr and need to download 2 wims instead of 1 well that adds alot of time.

What I would instead recommend is merging two Wim files into one, this will save alot of space and still give you the option to use different ref images in the same task sequence.

So how is this done?

First off you need to create two ref images. The most common senario for this is you have one with Office preinstalled and one without Office preinstalled. So if we look at how that looks you will get something like this:


In this case I am using Windows 10 ref images but this works just as well with Windows Vista, 7, 8 and 8.1 (all Wim based OSes).

So as you can see they are around 4-5GB in size. The next step now is to merge them. To help with this i have a small script that you can use.

What the script does is it takes one wim and mounts it. Then it applies the mounted wim into the other wim so you get two indexes and next it cleans up the mounted directory and finally displays the different indexes in the merged wim file.

You can download the script here:

When that is complete you get something looking like this.


As you can see the image is now a bit bigger but it has not doubled in size. This is due to the fact that when the wims are merged it will throw away all duplicate files to keep the file size down.

This method is the same method Microsoft have used when they have created Windows Server medias in the past containing core and gui versions on the same media.

The next step is to import this into whatever solution you are using (MDT/SCCM).

In this instance I have used MDT and it looks similar in SCCM but there are a couple of differentes. If you are unsure, drop me an email or pm and I can help you out.

So, import Operating system, custom image and point to the wim created erlier. When its done it looks something like this


If we look at the preferences for these two operating systems you can see that they both use the same file in the background but different indexes.


Now you can add another install operating system step and select different citeras to run the different steps. For instance, different blocks in CustomSettings.ini, some setting in the MDT database or add a new setting to the MDT database and use that. Use webservices and if the computer is this OU or AD group it should have office and if not it shouldn’t. The possibilities to create rules are as always limitless.

Happy deploying!


Office 2016 Preview – Downloading missing cab files

So I have downloaded the Office 2016 Preview and installed it. It all works fine until you do setup.exe /download configuration.xml

Now the fun starts, the download in it self will work and download the Office CAB files. Well almost. It download some of them but not all.

After some digging I found that missing ones, which do exists on the office365 download site but are not getting downloaded during the pre download phase.

The fix is easy just download the needed files and place them in the Cache folder and you can now install it with local files.

Since I don’t like manual labor downloading x number of file manually is out and PowerShell is in. I created a small script that will download all the required files and place them in the folder specified by the confuigration.xml file. Note that this will require you to modify the configuration file so they are saved locally.

Place the script in the same folder as setup.exe, modify an existing xml file to use a local store or create a new one specifying the settings you want to.

Run the script down Download-Office.ps1 –settingsfile Custom.xml this will then use run the setup.exe and download the files it can, place them in the folder specified by custom.xml and then run the powershell bits around it and download the missing files.

The script also has an –install flag than can be used to install office using the same xml file. Note that it will download the files first and then run the install from the local files (if you don’t want to do and online install). It is not intended to be used as a replacement for the normal
setup.exe install.

The script can be found here