Installing Certificates with PowerShell
Powershell 2.0 is installed on Windows Vista and later, and can be installed onto Windows XP (click on this
link for more information).
In Vista and later, open Powershell as follows:
- Press the Windows Logo key (the one with the 4 pane window on it, bottom left of the keyboard.
- The Start menu will display. If Powershell is displayed on the menu, go to step 4.
- Type powershell into the Search programs and files Edit box and a powershell link appears at the
top of the Start menu.
- Right-click on the Powershell link. This displays a pop-up menu.
- Click on Run as administrator. Powershell will open and the title bar should start with
Administrator.
In Windows XP, open Powershell as follows:
- Press the Windows Logo key (the one with the 4 pane window on it, bottom left of the keyboard.
- The Start menu will display. Place the Mouse over the Programs item.
- A child menu pops up. Move the Mouse over the Accessories item.
- Another child menu pops up. Move the Mouse over the Windows PowerShell item.
- Right-click on the Windows PowerShell item. Another child menu pops up.
- Click on the Run as... item. The Run as window opens.
- From this window you can open Powershell as the current user, or as another user. If the current user has
Administrator access rights, just click on the OK button. Otherwise, click on The following user:
check box, and then select the User name: you want and type in the Password:. Finally, click on the
OK button. Powershell will open and the title bar should start with Administrator.
If the Powershell title bar starts with
Administrator, you can install certificates into the
LocalMachine
or the
CurrentUser stores. If the title bar does not start with this, you can only install certificates into
the
CurrentUser store. The following text files are available to allow you to install certificates using
Powershell:
Download both files (for example to your Desktop) by
right-clicking on each link and then clicking on
SaveTarget As... (otherwise the text will probably just be displayed in the browser).
These files are text files, but they can be made into
Powershell files by renaming them and removing the
.txt from the filename (which ends in
.ps1.txt)
if you really want to run then as Powershell scripts (not recommended).
Open the specific file you want (default program is
Notepad. NOTE: Click on the
Format menu item and
ensure that
Word Wrap is
Un-ticked (i.e. Off). If it is ticked, click on
Word Wrap to un-tick it.)
and then select all the text in the file
(Ctrl+A or use the Edit menu). Copy this text to the
Clipboard (use Ctrl+C or the Edit menu).
You now need to
Paste this copied text into Powershell as follows:
- Click on the Powershell Icon at the top left of the window. A pop-up menu will display.
- To paste the text you copied earlier into the Powershell window, just move the Mouse over the flashing
Powershell cursor and Right-click the Mouse button.
If the above Paste does not work, click on the Powershell Icon (top left of the title bar) and move the Mouse over the
Edit item. This displays a child pop-up menu. Click on the Paste item. This will paste in the
text that you copied earlier.
- The text will be copied into the Powershell window and the script code contained in it will be run.
- When the script has completed, check that the Powershell window shows Green text saying
Certificate file: XXX was successfully added to YYY container. XXX will be the Desktop
file path to the various P7B files you downloaded earlier.
YYY is the certificate store (or container) such as Root.
Any error will be shown as Red text.
You can use
Certmgr.msc or the
Microsoft Management Console (MMC) with the
Certificates
Snap-in to review certificates in the CurrentUser or LocalMachine stores. See this
link for more information.
Note: Some programs support their own
certificate stores, rather than using the Window store (For example,
web browsers such as Mozilla Firefox, and Mail programs generally). In these cases, you need to follow their
specific instructions on how to handle certificates.