Introduction
This post will provide a do-it-your-self demo in order to understand the basics and potential of the PSKeePass PowerShell module. Completion time is about 10 minutes.
What will you learn?
After completing the demo you will have a basic understanding on how to use the module and how it can be applied.
What are we going do to?
You will follow the basic steps of importing the module and create a new KeePass database, followed by adding an entry in to that database. Then we are going to create a PowerShell script (function) that uses the Get-KeePassEntry cmdlet to get the credential you created and opens a terminal server session.
Preparations
Follow the installation instructions on the PsKeePass project page.
Assumptions
Depending on your operating system, your PowerShell version may vary, For Windows 2008R2 it is PowerShell 2.0, Windows 10 has PowerShell 5.0. I am assuming the latter. Please be aware that PowerShell 2.0 has some limitations by design (e.g. TAB completion), please check the PsKeePass project page for further details. During the instructions represents the server to connect to, please change it to the appropriate hostname for you without the parenthesis. Path will be represented as "D:\Demo\", please change these to valid paths appropriate for you.
Copy Invoke-Mstsc.ps1
You can find the script here and copy it to the folder of your choice which is in my case D:\Demo. You might notice from reading the script source that I store the provided credential in the Windows Credential Manager. This is required because the latest MSTSC versions no longer have the ability to add a credential from the command line.
Start...Go!
Follow the instruction below to complete the demo. Are you ready???!
No comments :
Post a Comment