So, you’ve filled your PowerShell profile with dozens of useful functions and aliases. You use a few of them very often. But most of them are useful only once in a while. Now isn’t it annoying to have to open a ps1 file and go over all function definitions just to find the function name for a script that would sometimes take even less time to just write anew? Imagine you could use something like “Get-Help” or “Get-Command” to remind you of functions that you wrote a while back. Why imagine? Let me...
One of our customers was wandering if it is at all possible to find, using PowerShell, all documents in a specific folder that have "Track Changes" activated. This is what I came up with, and it works well: function FindTrackRevisions ([ string ] $path ) { $files = Get-ChildItem $path -Filter " *.doc " $results = @{}; $wa = New-Object -ComObject Word.Application $wa .Visible = $false $files | % { $filePath = $_ .FullName $wd = $wa .Documents.Add( $filePath ) Write-Host "...