{"id":3042,"date":"2013-05-17T15:00:29","date_gmt":"2013-05-17T19:00:29","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=3042"},"modified":"2013-05-23T19:30:13","modified_gmt":"2013-05-23T23:30:13","slug":"friday-fun-a-powershell-tickler","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/","title":{"rendered":"Friday Fun: A PowerShell Tickler"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-3043\" alt=\"elmo\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo-221x300.jpg\" width=\"221\" height=\"300\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo-221x300.jpg 221w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo.jpg 339w\" sizes=\"auto, (max-width: 221px) 100vw, 221px\" \/><\/a>I spend a lot of my day in the PowerShell console. As you might imagine, I often have a lot going on and sometimes it is a challenge to keep on top of everything. So I thought I could use PowerShell to help out. I created a PowerShell tickler system. Way back in the day a tickler system was something that would give you a reminder about an impending event or activity. What I decided I wanted was a tickler that would display whenever I started PowerShell.<\/p>\n<p>This doesn't replace my calendar and task list, but it let's me see events I don't want to miss right from PowerShell. As I worked through this idea I ended up with a PowerShell module, MyTickle.psm1, that has a number of functions to managing the tickle events, as I call them. From PowerShell I can get events, add, set and remove. I thought the module would make a good Friday Fun post because it certainly isn't a high impact project but it offers some ideas on building a module and functions that I hope you'll find useful.<\/p>\n<p>The module for right now is a single file. Here's the file and below I'll talk about.<\/p>\n<pre class=\"lang:ps decode:true\">#requires -version 3.0\r\n\r\n#  ****************************************************************\r\n#  * DO NOT USE IN A PRODUCTION ENVIRONMENT UNTIL YOU HAVE TESTED *\r\n#  * THOROUGHLY IN A LAB ENVIRONMENT. USE AT YOUR OWN RISK.  IF   *\r\n#  * YOU DO NOT UNDERSTAND WHAT THIS SCRIPT DOES OR HOW IT WORKS, *\r\n#  * DO NOT USE IT OUTSIDE OF A SECURE, TEST SETTING.             *\r\n#  ****************************************************************\r\n\r\n#MYTICKLE.PSM1\r\n#Last updated 5\/17\/2013\r\n\r\n#region Define module variables\r\n#This should be the WindowsPowerShell folder under your Documents folder\r\n$profileDir = Split-Path $profile\r\n\r\n#the path to the tickle csv file\r\n$TicklePath = Join-Path -Path $profileDir -ChildPath \"mytickler.csv\"\r\n\r\n#the default number of days to display\r\n$TickleDefaultDays = 7 \r\n#endregion\r\n\r\n#region Define module functions\r\n\r\nFunction Get-TickleEvent {\r\n\r\n&lt;#\r\n\r\n.Synopsis\r\nGet Tickle Events\r\n.Description\r\nGet tickle events by id or name. The default behavior is to get all events in\r\ndate order. You can specify a range of ID numbers and use wildcards with the \r\nevent names. Use the Expired switch to get all tickle events that have already \r\noccurred. \r\n\r\nThe command will not throw an exception if no matching tickle events are found.\r\n\r\n#&gt;\r\n\r\n[cmdletbinding(DefaultParameterSetname=\"ALL\")]\r\nParam(\r\n[Parameter(Position=0,ParameterSetName=\"ID\")]\r\n[int[]]$Id,\r\n[Parameter(Position=0,ParameterSetName=\"Name\")]\r\n[string]$Name,\r\n[Parameter(Position=0,ParameterSetName=\"Expired\")]\r\n[switch]$Expired,\r\n[ValidateScript({Test-Path $_} )]\r\n[string]$Path=$TicklePath\r\n)\r\n\r\nWrite-Verbose \"Importing events from $Path\"\r\n\r\nSwitch ($pscmdlet.ParameterSetName) {\r\n \"ID\"      {\r\n            Write-Verbose \"by ID\" \r\n            $filter = [scriptblock]::Create(\"`$_.id -in `$id\")  }\r\n \"Name\"    { \r\n            Write-Verbose \"by Name\"\r\n            $filter = [scriptblock]::Create(\"`$_.Event -like `$Name\") }\r\n \"Expired\" { \r\n            Write-Verbose \"by Expiration\"\r\n            $filter = [scriptblock]::Create(\"`$_.Date -lt (Get-Date)\") }\r\n \"All\"     { \r\n            Write-Verbose \"All\"\r\n            $filter = [scriptblock]::Create(\"`$_ -match '\\w+'\") }\r\n\r\n} \r\n\r\n#import CSV and cast properties to correct type\r\nImport-CSV -Path $Path | \r\nSelect @{Name=\"ID\";Expression={[int]$_.ID}},\r\n@{Name=\"Date\";Expression={[datetime]$_.Date}},\r\nEvent,Comment | where $Filter | Sort date\r\n\r\n} #Get-TickleEvent\r\n\r\nFunction Set-TickleEvent {\r\n\r\n&lt;#\r\n\r\n.Synopsis\r\nSet a tickle event\r\n.Description\r\nThis command will update the settings for a tickle event. You can update the\r\nevent name, date or comment. The easiest way to use this is to pipe an tickle\r\nevent to this command.\r\n\r\n#&gt;\r\n\r\n[cmdletbinding(SupportsShouldProcess,DefaultParameterSetName=\"Inputobject\")]\r\nParam(\r\n[Parameter(Position=0,Mandatory,HelpMessage=\"Enter the tickle event id\",ParameterSetName=\"ID\")]\r\n[int]$Id,\r\n[Parameter(Position=1,ValueFromPipeline,ParameterSetname=\"Inputobject\")]\r\n[object]$Inputobject,\r\n[datetime]$Date,\r\n[string]$Event,\r\n[string]$Comment,\r\n[ValidateScript({Test-Path $_} )]\r\n[string]$Path=$TicklePath,\r\n[switch]$Passthru\r\n)\r\nBegin {\r\n    write-verbose \"Using $($PSCmdlet.ParameterSetName) parameter set\"\r\n}\r\nProcess {\r\n\r\n#if ID only then get event from CSV\r\nSwitch ($pscmdlet.ParameterSetName) {\r\n \"ID\" {\r\n    Write-Verbose \"Getting tickle event id $ID\"\r\n    $myevent = Get-TickleEvent -id $id\r\n   }\r\n \"Inputobject\" {\r\n    Write-Verbose \"Modifying inputobject\"\r\n    $myevent = $Inputobject\r\n }\r\n} #switch\r\n\r\n#verify we have an event to work with\r\nif ($myevent) {\r\n    #modify the tickle event object\r\n    write-verbose ($myevent | out-string)\r\n\r\n    if ($Date) {\r\n      Write-Verbose \"Setting date to $date\"\r\n      $myevent.date = $Date\r\n    }\r\n    if ($Event) {\r\n      Write-Verbose \"Setting event to $event\"\r\n      $myevent.event = $Event\r\n    }\r\n    if ($comment) {\r\n      Write-verbose \"Setting comment to $comment\"\r\n      $myevent.comment = $comment\r\n    }\r\n    write-verbose \"Revised: $($myevent | out-string)\"\r\n\r\n    #find all lines in the CSV except the matching event\r\n    $otherevents = get-content -path $Path | where {$_ -notmatch \"^\"\"$($myevent.id)\"} \r\n    #remove it\r\n    $otherevents | Out-File -FilePath $Path -Encoding ascii \r\n\r\n    #append the revised event to the csv file\r\n    $myevent | Export-Csv -Path $Path -Encoding ASCII -Append -NoTypeInformation\r\n\r\n    if ($passthru) {\r\n        $myevent\r\n    }\r\n}\r\nelse {\r\n    Write-Warning \"Failed to find a valid tickle event\"\r\n}\r\n\r\n} #process\r\n\r\n} #Set-TickleEvent\r\n\r\nFunction Add-TickleEvent {\r\n\r\n&lt;#\r\n.Synopsis\r\nAdd a tickle event\r\n.Description\r\nThis command will create a new tickle event. If the CSV file referenced by the\r\nTicklePath variable does not exist, it will be created. You must enter an event \r\nname and date.\r\n#&gt;\r\n\r\n[cmdletbinding(SupportsShouldProcess)]\r\n\r\nParam (\r\n[Parameter(Position=0,ValueFromPipelineByPropertyName,Mandatory,HelpMessage=\"Enter the name of the event\")]\r\n[string]$Event,\r\n[Parameter(Position=1,ValueFromPipelineByPropertyName,Mandatory,HelpMessage=\"Enter the datetime for the event\")]\r\n[datetime]$Date,\r\n[Parameter(Position=2,ValueFromPipelineByPropertyName)]\r\n[string]$Comment,\r\n[ValidateNotNullorEmpty()]\r\n[string]$Path=$TicklePath,\r\n[switch]$Passthru\r\n)\r\n\r\nBegin {\r\n    #verify the path and create the file if not found\r\n    if (! (Test-Path $Path)) {\r\n        Write-Verbose \"Creating a new file: $Path\"\r\n        Try {\r\n         '\"id\",\"Date\",\"Event\",\"Comment\"' | \r\n         Out-File -FilePath $Path -Encoding ascii -ErrorAction Stop\r\n        }\r\n        Catch {\r\n            Write-Warning \"Failed to create $Path\"\r\n            Write-Warning $_.Exception.Message\r\n            $NoFile = $True\r\n        }\r\n    }\r\n}\r\n\r\nProcess {\r\nif ($NoFile) {\r\n    Write-Verbose \"No CSV file found.\"\r\n    #bail out of the command\r\n    Return\r\n}\r\n\r\n#get last id and add 1 to it\r\n[int]$last = Import-Csv -Path $Path | \r\nSort {$_.id -AS [int]} | Select -last 1 -expand id\r\n[int]$id = $last+1\r\n\r\n$hash=[ordered]@{\r\n  ID = $id\r\n  Date = $date\r\n  Event = $event\r\n  Comment = $comment\r\n}\r\nWrite-Verbose \"Adding new event\"\r\nWrite-Verbose ($hash | out-string)\r\n\r\n$myevent = [pscustomobject]$hash\r\n$myevent | Export-Csv -Path $Path -Append -Encoding ASCII -NoTypeInformation\r\nif ($passthru) {\r\n    $myevent\r\n}\r\n} #process\r\n\r\n} #Add-TickleEvent\r\n\r\nFunction Remove-TickleEvent {\r\n&lt;#\r\n.Synopsis\r\nRemove a tickle event\r\n.Description\r\nRemove one or more events from the tickle file. This will overwrite the current\r\nfile so you might want to back it up first with Backup-TickleFile.\r\n.Example\r\nPS C:\\&gt; get-ticklevent -expired | remove-tickleevent\r\n#&gt;\r\n\r\n[cmdletbinding(SupportsShouldProcess,DefaultParameterSetName=\"Inputobject\")]\r\nParam(\r\n[Parameter(Position=0,Mandatory,HelpMessage=\"Enter the tickle event id\",ParameterSetName=\"ID\")]\r\n[int]$Id,\r\n[Parameter(Position=1,ValueFromPipeline,ParameterSetname=\"Inputobject\")]\r\n[object]$Inputobject,\r\n[ValidateScript({Test-Path $_} )]\r\n[string]$Path=$TicklePath\r\n)\r\n\r\nProcess {\r\n\r\n    #if ID only then get event from CSV\r\n    Switch ($pscmdlet.ParameterSetName) {\r\n     \"ID\" {\r\n        Write-Verbose \"Getting tickle event id $ID\"\r\n        $myevent = Get-TickleEvent -id $id\r\n       }\r\n     \"Inputobject\" {\r\n        Write-Verbose \"Identifying inputobject\"\r\n        $myevent = $Inputobject\r\n     }\r\n    } #switch\r\n\r\n    #verify we have an event to work with\r\n    if ($myevent) {\r\n        Write-Verbose \"Removing event\"\r\n        Write-Verbose ($myEvent | Out-String)\r\n        if ($pscmdlet.ShouldProcess(($myEvent | Out-String))) {\r\n        #find all lines in the CSV except the matching event\r\n        $otherevents = Get-Content -path $Path | where {$_ -notmatch \"^\"\"$($myevent.id)\"} \r\n        #remove it\r\n        $otherevents | Out-File -FilePath $Path -Encoding ascii \r\n        }\r\n    } #if myevent\r\n\r\n} #process\r\n\r\n} #Remove-TickleEvent\r\n\r\nFunction Show-TickleEvent {\r\n&lt;#\r\n.Synopsis\r\nDisplay Tickle events in the console\r\n.Description\r\nThis command gets upcoming tickle events and writes them to the console using\r\nWrite-Host. Use this command in your PowerShell profile script.\r\n#&gt;\r\n\r\n[cmdletbinding()]\r\nParam(\r\n[Parameter(Position=0)]\r\n[ValidateScript({Test-Path $_})]\r\n[string]$Path=$TicklePath,\r\n[Parameter(Position=1)]\r\n[ValidateScript({$_ -ge 1})]\r\n[int]$Days = $TickleDefaultDays\r\n)\r\n\r\n#import events from CSV file\r\n$events = Import-Csv -Path $Path\r\n\r\n#get upcoming events within 7 days sorted by date\r\n$upcoming = $events | \r\nwhere {\r\n #get the timespan between today and the event date\r\n $ts = (New-TimeSpan -Start (Get-Date) -end $_.Date).TotalHours \r\n #find events less than the default days value and greater than 0\r\n Write-Verbose $ts\r\n $ts -le ($Days*24) -AND $ts -gt 0\r\n } |\r\nAdd-Member -MemberType ScriptProperty -Name Countdown -value {New-TimeSpan -start (Get-Date) -end $this.date} -PassThru -force|\r\nsort CountDown\r\n\r\nif ($upcoming) {\r\n#how wide should the box be?\r\n#get the length of the longest line\r\n$l = 0\r\nforeach ($item in $upcoming) {\r\n #turn countdown into a string without the milliseconds\r\n  $count = $item.countdown.ToString()\r\n  $time = $count.Substring(0,$count.lastindexof(\".\"))\r\n  #add the time as a new property\r\n  $item | Add-Member -MemberType Noteproperty -name Time -Value $time\r\n  $a = \"$($item.event) $($item.Date) [$time]\".length\r\n  if ($a -gt $l) {$l = $a}\r\n  $b = $item.comment.Length\r\n  if ($b -gt $l) {$l = $b}\r\n}\r\n\r\n[int]$width = $l+5\r\n\r\n$header=\"* Reminders $((Get-Date).ToShortDateString())\"\r\n\r\n#display events\r\nWrite-Host \"`r\"\r\nWrite-host \"$($header.padright($width,\"*\"))\" -ForegroundColor Cyan\r\nWrite-Host \"*$(' '*($width-2))*\" -ForegroundColor Cyan\r\n\r\nforeach ($event in $upcoming) {\r\n\r\n  if ($event.countdown.totalhours -le 24) {\r\n    $color = \"Red\"\r\n  }\r\n  elseif ($event.countdown.totalhours -le 48) {\r\n    $color = \"Yellow\"\r\n  }\r\n  else {\r\n    $color = \"Green\"\r\n  }\r\n\r\n  #define the message string\r\n  $line1 = \"* $($event.event) $($event.Date) [$($event.time)]\"\r\n  if ($event.comment -match \"\\w+\") {\r\n   $line2 = \"* $($event.Comment)\"\r\n   $line3 = \"*\"\r\n  }\r\n  else {\r\n   $line2 = \"*\"\r\n   $line3 = $null\r\n  }\r\n\r\n$msg = @\"\r\n$($line1.padRight($width-1))*\r\n$($line2.padright($width-1))*\r\n\"@\r\n\r\nif ($line3) {\r\n    #if there was a comment add a third line that is blank\r\n    $msg+=\"`n$($line3.padright($width-1))*\"\r\n}\r\n\r\n  Write-Host $msg -ForegroundColor $color\r\n\r\n} #foreach\r\n\r\nWrite-host (\"*\"*$width) -ForegroundColor Cyan\r\nWrite-Host \"`r\"\r\n} #if upcoming events found\r\nelse {\r\n  $msg = @\"\r\n\r\n**********************\r\n* No event reminders *\r\n**********************\r\n\r\n\"@\r\n  Write-host $msg -foregroundcolor Green\r\n}\r\n\r\n} #Show-TickleEvent\r\n\r\nFunction Backup-TickleFile {\r\n&lt;#\r\n.Synopsis\r\nCreate a backup of the tickle file\r\n.Description\r\nThis command will create a backup copy of the tickle CSV file. The default path\r\nis the same directory as the tickle file. You might want to backup the tickle\r\nfile before removing any events.\r\n#&gt;\r\n\r\n[cmdletbinding(SupportsShouldProcess)]\r\nParam(\r\n[ValidateScript({Test-Path $_} )]\r\n[string]$Path=$TicklePath,\r\n[ValidateScript({Test-Path $_} )]\r\n[string]$Destination = (Split-Path $TicklePath),\r\n[switch]$Passthru\r\n)\r\n\r\nTry {\r\n    $ticklefile = Get-Item -Path $path\r\n    $backup = Join-Path -path $Destination -ChildPath \"$($ticklefile.basename).bak\"\r\n    Write-Verbose \"Copying $path to $backup\"\r\n    $ticklefile | Copy-Item  -Destination $backup -ErrorAction Stop -PassThru:$Passthru\r\n}\r\nCatch {\r\n    Write-Warning \"Failed to backup file\"\r\n    Write-Warning $_.exception.message\r\n}\r\n} #Backup-TickleFile\r\n\r\n#endregion\r\n\r\n#region Define module aliases\r\nSet-Alias -Name gte -value Get-TickleEvent\r\nSet-Alias -name ate -Value Add-TickleEvent\r\nSet-Alias -name rte -Value Remove-TickleEvent\r\nSet-Alias -name ste -Value Set-TickleEvent\r\nSet-Alias -name shte -Value Show-TickleEvent\r\nSet-Alias -name btf -Value Backup-Ticklefile\r\n#endregion\r\n\r\nExport-ModuleMember -Function * -Variable TicklePath,TickleDefaultDays -Alias *<\/pre>\n<p>You should be able to copy the code from the WordPress plugin and paste it into a script file locally. You can call it whatever you want just remember to use a .psm1 file extension. The module uses some PowerShell 3.0 features like ordered hashtables but you could revise to have it run in PowerShell 2.0. Fundamentally it should work in both versions.<\/p>\n<p>The events are stored in a CSV file that I reference with a module variable, $TicklePath. The default is a file called mytickler.csv which will be in your WindowsPowerShell folder under Documents. The module also defines a variable called $TickleDefaultDays, with a default value of 7. This displayed events to those that fall within that range. To use, I added these lines to my PowerShell profile.<\/p>\n<pre class=\"lang:ps decode:true\">import-module c:\\scripts\\mytickle.psm1\r\nshow-tickleevent<\/pre>\n<p>The result, is that when I launch a new PowerShell session I see something like this (the message about help updates is from something else so disregard):<br \/>\n<a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/show-tickle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-3044\" alt=\"show-tickle\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/show-tickle-1024x444.png\" width=\"625\" height=\"270\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/show-tickle-1024x444.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/show-tickle-300x130.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/show-tickle-624x270.png 624w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/show-tickle.png 1137w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>Here's how it works.<\/p>\n<p>The Show-TickleEvent function imports events from the CSV file that will happen within the next 7 days. Each object also gets an additional property that is a timespan object for how much time remains. The function then parses event information and constructs a \"box\" around the events.<\/p>\n<pre class=\"lang:ps decode:true\">#how wide should the box be?\r\n#get the length of the longest line\r\n$l = 0\r\nforeach ($item in $upcoming) {\r\n #turn countdown into a string without the milliseconds\r\n  $count = $item.countdown.ToString()\r\n  $time = $count.Substring(0,$count.lastindexof(\".\"))\r\n  #add the time as a new property\r\n  $item | Add-Member -MemberType Noteproperty -name Time -Value $time\r\n  $a = \"$($item.event) $($item.Date) [$time]\".length\r\n  if ($a -gt $l) {$l = $a}\r\n  $b = $item.comment.Length\r\n  if ($b -gt $l) {$l = $b}\r\n}\r\n\r\n[int]$width = $l+5\r\n\r\n$header=\"* Reminders $((Get-Date).ToShortDateString())\"\r\n\r\n#display events\r\nWrite-Host \"`r\"\r\nWrite-Host \"$($header.padright($width,\"*\"))\" -ForegroundColor Cyan\r\nWrite-Host \"*$(' '*($width-2))*\" -ForegroundColor Cyan\r\n\r\n#get upcoming events within 7 days sorted by date\r\n$upcoming = $events |\r\nwhere {\r\n#get the timespan between today and the event date\r\n$ts = (New-TimeSpan -Start (Get-Date) -end $_.Date).TotalHours\r\n#find events less than the default days value and greater than 0\r\nWrite-Verbose $ts\r\n$ts -le ($Days*24) -AND $ts -gt 0\r\n} |\r\nAdd-Member -MemberType ScriptProperty -Name Countdown -value {New-TimeSpan -start (Get-Date) -end $this.date} -PassThru -force |\r\nsort CountDown<\/pre>\n<p>I set a foreground color depending on how imminent the event is and then write each event to the console, wrapped in my border.<\/p>\n<pre class=\"lang:ps decode:true\">#define the message string\r\n  $line1 = \"* $($event.event) $($event.Date) [$($event.time)]\"\r\n  if ($event.comment -match \"\\w+\") {\r\n   $line2 = \"* $($event.Comment)\"\r\n   $line3 = \"*\"\r\n  }\r\n  else {\r\n   $line2 = \"*\"\r\n   $line3 = $null\r\n  }\r\n\r\n$msg = @\"\r\n$($line1.padRight($width-1))*\r\n$($line2.padright($width-1))*\r\n\"@\r\n\r\nif ($line3) {\r\n    #if there was a comment add a third line that is blank\r\n    $msg+=\"`n$($line3.padright($width-1))*\"\r\n}\r\n\r\n  Write-Host $msg -ForegroundColor $color<\/pre>\n<p>I purposely used Write-Host so that I could color code events and because I didn't want the profile to write anything to the pipeline. Because the module is loaded at the start of my PowerShell session, I can always run Show-TickleEvent and event specify a different number of days. If I want objects, then I can use the Get-TickleEvent function which will import the csv events based on a criteria like ID or name. The function uses parameter sets and I create a filter scriptblock depending on the parameter set.<\/p>\n<pre class=\"lang:ps decode:true\">Switch ($pscmdlet.ParameterSetName) {\r\n \"ID\"      {\r\n            Write-Verbose \"by ID\" \r\n            $filter = [scriptblock]::Create(\"`$_.id -in `$id\")  }\r\n \"Name\"    { \r\n            Write-Verbose \"by Name\"\r\n            $filter = [scriptblock]::Create(\"`$_.Event -like `$Name\") }\r\n \"Expired\" { \r\n            Write-Verbose \"by Expiration\"\r\n            $filter = [scriptblock]::Create(\"`$_.Date -lt (Get-Date)\") }\r\n \"All\"     { \r\n            Write-Verbose \"All\"\r\n            $filter = [scriptblock]::Create(\"`$_ -match '\\w+'\") }\r\n\r\n}<\/pre>\n<p>When I import the CSV file, I add types to the properties because otherwise everything would be a string, and then pipe each object to my filter.<\/p>\n<pre class=\"lang:ps decode:true\">#import CSV and cast properties to correct type\r\nImport-CSV -Path $Path | \r\nSelect @{Name=\"ID\";Expression={[int]$_.ID}},\r\n@{Name=\"Date\";Expression={[datetime]$_.Date}},\r\nEvent,Comment | where $Filter | Sort Date<\/pre>\n<p>These objects come in handy because they can be piped to Set-TickleEvent to modify values like event name, date or comment. Or I can pipe to Remove-TickleEvent to delete entries. The deletion process in essence finds all lines in the CSV file that don't start with the correct id and creates a new file using the same name.<\/p>\n<pre class=\"lang:ps decode:true\">if ($pscmdlet.ShouldProcess(($myEvent | Out-String))) {\r\n  #find all lines in the CSV except the matching event\r\n  $otherevents = Get-Content -path $Path | where {$_ -notmatch \"^\"\"$($myevent.id)\"} \r\n  #remove it\r\n  $otherevents | Out-File -FilePath $Path -Encoding ascii \r\n }<\/pre>\n<p>Finally, after accidentally wiping out event files, I added a simple backup function copies the CSV file to the same directory but with a .BAK file extension. You could specify an alternate path, but it defaults to the WindowsPowerShell folder.<\/p>\n<p>Hopefully I won't miss important events again, of course assuming I add them to my tickler file. I'll let you play with Add-TickleEvent to see how that works or you could always modify the CSV file with Notepad.<\/p>\n<p>If you actually use this, I hope you'll let me know.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I spend a lot of my day in the PowerShell console. As you might imagine, I often have a lot going on and sometimes it is a challenge to keep on top of everything. So I thought I could use PowerShell to help out. I created a PowerShell tickler system. Way back in the day&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Friday Fun: A  #PowerShell Tickler","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[271,4],"tags":[568,356,221,534],"class_list":["post-3042","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","tag-friday-fun","tag-import-csv","tag-module","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: A PowerShell Tickler &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: A PowerShell Tickler &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I spend a lot of my day in the PowerShell console. As you might imagine, I often have a lot going on and sometimes it is a challenge to keep on top of everything. So I thought I could use PowerShell to help out. I created a PowerShell tickler system. Way back in the day...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-17T19:00:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-05-23T23:30:13+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo-221x300.jpg\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: A PowerShell Tickler\",\"datePublished\":\"2013-05-17T19:00:29+00:00\",\"dateModified\":\"2013-05-23T23:30:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/\"},\"wordCount\":712,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/elmo-221x300.jpg\",\"keywords\":[\"Friday Fun\",\"Import-CSV\",\"module\",\"PowerShell\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/\",\"name\":\"Friday Fun: A PowerShell Tickler &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/elmo-221x300.jpg\",\"datePublished\":\"2013-05-17T19:00:29+00:00\",\"dateModified\":\"2013-05-23T23:30:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/elmo.jpg\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/elmo.jpg\",\"width\":339,\"height\":460},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3042\\\/friday-fun-a-powershell-tickler\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun: A PowerShell Tickler\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Friday Fun: A PowerShell Tickler &#8226; The Lonely Administrator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: A PowerShell Tickler &#8226; The Lonely Administrator","og_description":"I spend a lot of my day in the PowerShell console. As you might imagine, I often have a lot going on and sometimes it is a challenge to keep on top of everything. So I thought I could use PowerShell to help out. I created a PowerShell tickler system. Way back in the day...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/","og_site_name":"The Lonely Administrator","article_published_time":"2013-05-17T19:00:29+00:00","article_modified_time":"2013-05-23T23:30:13+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo-221x300.jpg","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: A PowerShell Tickler","datePublished":"2013-05-17T19:00:29+00:00","dateModified":"2013-05-23T23:30:13+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/"},"wordCount":712,"commentCount":3,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo-221x300.jpg","keywords":["Friday Fun","Import-CSV","module","PowerShell"],"articleSection":["Friday Fun","PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/","name":"Friday Fun: A PowerShell Tickler &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo-221x300.jpg","datePublished":"2013-05-17T19:00:29+00:00","dateModified":"2013-05-23T23:30:13+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo.jpg","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo.jpg","width":339,"height":460},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun: A PowerShell Tickler"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":5675,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5675\/powershell-reminders-now-in-beta\/","url_meta":{"origin":3042,"position":0},"title":"PowerShell Reminders now in Beta","author":"Jeffery Hicks","date":"October 6, 2017","format":false,"excerpt":"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\u2026","rel":"","context":"In &quot;GitHub&quot;","block_context":{"text":"GitHub","link":"https:\/\/jdhitsolutions.com\/blog\/category\/github\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image_thumb.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image_thumb.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image_thumb.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/10\/image_thumb.png?resize=700%2C400 2x"},"classes":[]},{"id":6388,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/","url_meta":{"origin":3042,"position":1},"title":"Maximizing My Prompt in PowerShell Core","author":"Jeffery Hicks","date":"January 10, 2019","format":false,"excerpt":"Yesterday I wrote about my intention to make PowerShell Core, running on Windows 10, my \"daily driver\". I've also written recently about using the PowerShell prompt function to provide a wide range of information. So I decided to combine the two, plus mix in some functionality from my other PowerShell\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-13.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-13.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-13.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":6262,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6262\/revised-everything-powershell-prompt\/","url_meta":{"origin":3042,"position":2},"title":"Revised Everything PowerShell Prompt","author":"Jeffery Hicks","date":"December 7, 2018","format":false,"excerpt":"Since it is Friday and time for some more PowerShell fun, and I\u2019ve been sharing some of my prompt functions, I thought I\u2019d re-share my kitchen sink prompt. This PowerShell prompt function does *a lot* to things and gives you a snapshot view of your system everytime you press enter.\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/12\/image_thumb-5.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/12\/image_thumb-5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/12\/image_thumb-5.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":7149,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7149\/friday-fun-taking-a-shortcut-path-in-your-powershell-prompt\/","url_meta":{"origin":3042,"position":3},"title":"Friday Fun: Taking a Shortcut Path in Your PowerShell Prompt","author":"Jeffery Hicks","date":"January 3, 2020","format":false,"excerpt":"To kick off the new year I thought I'd take a shortcut and reclaim some wasted space in my PowerShell prompt. I know I run into this issue during classes and conferences. Perhaps you encounter it as well. You are in in the PowerShell console and have ended up in\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/01\/image_thumb-3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/01\/image_thumb-3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/01\/image_thumb-3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/01\/image_thumb-3.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2962,"url":"https:\/\/jdhitsolutions.com\/blog\/friday-fun\/2962\/friday-fun-powershell-commands-by-noun\/","url_meta":{"origin":3042,"position":4},"title":"Friday Fun PowerShell Commands by Noun","author":"Jeffery Hicks","date":"April 19, 2013","format":false,"excerpt":"One of PowerShell's greatest strength's is discoverability. Once you know how, it is very easy to discover what \u00a0you can do with PowerShell and how. One reason this works is because PowerShell commands follow a consistent verb-noun naming convention. With this in mind, you can see all of the commands\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"get-command-noun-01","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/get-command-noun-01-1024x577.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/get-command-noun-01-1024x577.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/get-command-noun-01-1024x577.png?resize=525%2C300 1.5x"},"classes":[]},{"id":4923,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-ise\/4923\/friday-fun-tweaking-the-powershell-ise\/","url_meta":{"origin":3042,"position":5},"title":"Friday Fun: Tweaking the PowerShell ISE","author":"Jeffery Hicks","date":"February 19, 2016","format":false,"excerpt":"Today's fun is still PowerShell related, but instead of something in the console, we'll have some fun with the PowerShell ISE. One of the things I love about the PowerShell ISE is that you can customize it and extend it.\u00a0 My ISE Scripting Geek project is an example.\u00a0 But today\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-12.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=3042"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3042\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}