For awhile now I've been working on a PowerShell project that I use every day. I am always in a PowerShell prompt and because I always seem to have little things like phone calls or family events that I need to keep track of, I wrote a "tickler" system. The events are stored in a SQL database any my PowerShell commands query for upcoming events. My module has commands for setting up the database, querying commands and modifying data. All the SQL stuff is done without using the SQL PowerShell module because I didn't want to take a dependency on it and I want to write something that will work cross-platform. I wasn't sure if the SQL cmdlets would be 100% compatible, plus my needs were simple so I found it easier to write my own query function. Today, I decided to launch a semi-public beta and share it with you.
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
The module is called MyTickle and right now you can only find it on GitHub at https://github.com/jdhitsolutions/myTickle. Under Releases, download the latest beta and extract to a working folder or your modules folder. Right now, I'm assuming you already have a local instance of SQL Server Express or access to a remote SQL Server. I'm planning on adding code to download and install SQL Server Express locally. You should be fine with any of the last 2-3 versions of SQL Server. To setup the database, run Initialize-TickleDatabase, specifying a path for the mdb file (just the path, not the filename) and a server instance. Assuming you were using a local install of SQL Server Express you might run the command like this:
Initialize-TickleDatabase –databasepath d:\dbs –serverinstance localhost\sqlexpress
I have tested this with a remote installation. The database path is relative to the remote SQL server and of course you have to have permissions on the SQL Server to carry out this action.
Initialize-TickleDatabase –databasepath d:\mssql\itdb –serverinstance SQL01-IT
Once the database and table are set up you can begin adding events.
Add-TickleEvent -Event "Halloween" -Date "10/31/2017 6:00PM"
Use Get-TickleEvent to see all events that have not expired.
I also have a command, that I use in my PowerShell profile called Show-TickleEvent that gets events for the next 7 days (as set with $TickleDefaultDays) and displays it with Write-Host so that output can be colorized. Events in the next 24 hours are shown in red.
Most of the commands also have aliases which you can see from simple help.
I hope you'll give this a spin and let me know what you think. Please use the Issues section of the Github repository.
nice!
please consider using SQL Server 2016 express localdb.
KR
Guenther
I’m not planning on forcing the use of any particular SQL Server. The module won’t include SQL Server bits, except maybe something to download the latest SQL Server Express files and install it locally.