Outlook 2019 – Problem with corrupted PST

Sometimes, when you tried to open PST from Outlook, it can occur that PST is corrupted. Outlook will get restarted and it will try to repair PST, but it is not always successful and some PST can remain corrupted. At this point Outlook will try to repair PST always on start, but if the first attempt failed, it will fail also the second, third, …
Outlook will try to repair this PST even in case you delete PST from disk. The reason is in registry key where Outlook record action to take and the last corrupted PST.
Now that you know this, it’s very simple to solve this problem: open regedit.exe, navigate to HKCU\Software\Microsoft\Office\16.0\Outlook\PST and change the value of the key PromptRepair to 0.
Start Outlook and it will open normally – without trying to repair the corrupted PST.
If you still need to repair PST, you have to find software like Stellar Repair Tool for Outlook or something similar on internet.

PowerShell Script for implement Mail Signature

At the beginning, we have to create a docx file. This is a normal file, containing a signature design as you want to appear and all variables from the script that you want to change (look at the end of the post for more information). This file has also to be saved on a share, where all the effected users have a read permission.
The script is written to create an Outlook signature and it is working if you have installed MS Word 2013 and MS Outlook 2013. It has been developed from a basic script on the Technet, but with additional checks and conditions as variables:

  • $SignatureVer – A version of signature – Change it when you have to deploy a new signature;
  • $UseSignOnNew – Use this signature when you send a new mail;
  • $UseSignOnReply – Use this signature when you send a mail as reply;
  • $ForceSignatureNew – Force this signature on a new mail. The user will not be able to change it (it will also force it on reply);
  • $ForceSignatureReply – Force signature on reply to mails.

Be careful because using forcing signature, will create registry values. Cancelling these settings means that you have to delete manually the registry values.

Two new registry values used by the script are introduced:

  • In the Path HKCU:’\Software\Microsoft\Office\15.0\Common\MailSettings, in the value VersionSignature, it is written a current version of the installed signature.
  • In the Path HKCU:’\Software\Microsoft\Office\15.0\Common\MailSettings, in the value ADChangeDate, it is written the date when the signature was applied.

We need both values to determinate if the company changed the version of signature and the new one has to be deployed in addition if something changed in AD user object, since the last deployment of the signature. If the AD user was changed, the user can choose if deploying the changes or not (reason / example: AD User will also change if the user changes the password and we do not deploy the new signature).
The script should be run as a logon script and it is divided into two blocks:

  1. The purpose of the first block is to determinate if the signature has to be deployed to user. Here we can see if the user already has a signature deployed and if something has changed from the last deployment. This block query AD User object and compare data from AD with local data.
  2. The second block effectually deploys the signature and for the optimization of the speed and load it run only when the script has to be deployed. It copies the docx template to local machine, changes the variables with real data and generates the signature in Outlook. To do this, the Outlook will be closed if it is open. At the end, the script writes the two registry values and delete the signature template from the local machine.

The script does not delete or effect in any other way none of the signatures that are present in Outlook. The only effect will be that, if you select, it will change the default signature on new and / or reply mails. Of course all data of the AD User object can be retrieved; you just need to found a field name in AD and associate it with variable in the script. It is pretty easy.

In my script, there are some variables that have to be present in a docx template:

  • DisplayName – Will be changed to Display value from AD
  • E-Mail – Will be changed to E-Mail value form AD
  • Title – Will be changed to Title value from AD
  • AllAddress – Will be changed to complete address from AD (street, city, CAP)
  • MobileN – Will be changed to Mobile number value from AD
  • WorkingOffice – Will be changed to Office value from AD

Of course is up to you to change these values to any other value as you wish, but be careful that values defined in script, are presented the Word template document. Only in this case the script will be able to change them.

You can download script here: Mail_Sign script.

How to change product key in Office 2010 and 2013

In some cases, you will need to change the product key for Microsoft Office 2010 or 2013. Unfortunately, there is no way to change it from Office programs via GUI, but there are still different ways to do it.
Personally, I prefer to do it from command prompt. I think that this way is transparent and clear to do all steps clearly and under control. To do this, you must open command prompt window as administrator and navigate to the one of this folders (depends on witch version of Office and Windows you have):
C:\Program Files (x86)\Microsoft Office\Office14
C:\Program Files\Microsoft Office\Office14
C:\Program Files (x86)\Microsoft Office\Office15
C:\Program Files\Microsoft Office\Office15
In this folder, there is situated the VBS script OSPP.VBS. This script is dedicated to work with product key and to change the product key you have to use syntax CSCRIPT OSPP.VBS /INPKEY:KEY_STRING (where KEY_STRING is the key). After you have changed the key, you have to activate it and this is possible to do it with the same script: CSCRIPT OSPP.VBS /ACT
Of course the script has more than this functionality and you can view them by typing CSCRIPT OSPP.VBS /?.

Good work!.