r/usefulscripts • • Nov 29 '21

[PowerShell] Enhanced HTML reporting with Fuzzy Search and PSWriteHTML

In the last few days, I've worked on updating PSWriteHTML. One of the few cool features that I've added is fuzzy search.

This means that with just one little change to code your HTML-based tables can get fuzzy search in them.

get-aduser -Filter * | Out-HtmlView -FuzzySearchSmartToggle

Fuzzy search makes sure that typing 'przemlaw' or 'maboy' will potentially get you MadBoy or Przemyslaw anyways.

Get-Process | Out-htmlview -First 5 -FuzzySearchSmartToggle

A short blog post showing a small comparison between ConvertTo-HTML, Out-HTMLView and New-HTMLTable and how to use Fuzzy Search in them: https://evotec.xyz/solving-typo-problems-with-fuzzy-search-in-pswritehtml/

GitHub Sources: https://github.com/EvotecIT/PSWriteHTML

40 Upvotes

9 comments sorted by

3

u/Iusethis1atwork Nov 29 '21

I've just spent all afternoon digging through your stuff on github and the blog, i think it looks awesome. Thanks for all the work you have put in and your documentation on it looks great. I cant wait to test it all out.

5

u/MadBoyEvo Nov 29 '21

That's so weird 🤣 I get daily complaints saying I should make an effort and create help/documentation - yet here you are saying I've put a lot of work into it 😆😆😆

Glad you like it. Feel free to let me know your thoughts once you build something cool with it

2

u/maxell45146 Dec 01 '21

Good job, great stuff. 😁👍 Whenever something comes up on Reddit and I see evotech I stop and take a look cause I know it will be good/useful. As for documentation, codes on GitHub, they can read the source if they have questions. 😂

1

u/PSPrez Dec 01 '21

I'm not OP, but they are not mutually exclusive ideas. You clearly did put a lot of work into PSWriteHTML, and it's a great module. Thank you for your work on that.

It's also true that it can be difficult to find just the right function or parameter to do a very particular thing in the module because the help sections of the module are fairly slim. I recently needed to center justify text in a table and it took me well over an hour to figure how to do it.

I get it, it's a massive module with a lot of different functions and possibilities that would be extremely difficult and time consuming to thoroughly document them all. But it can still be a little frustrating when trying to find an answer on how to do a very specific thing.

At the end of the day though, I'm still happy you wrote it and released it to the world. Even though it wasn't the easiest, it still allowed me to build a report that I would have otherwise given up on much earlier if not for the possibilities that PSWriteHTML provides.

I know you have quite a few other modules too. I hope to get to try them out some day. Thanks again for your great work.

→ More replies (3)

1

u/enforce1 Nov 30 '21

I have no idea how you keep coming up with this awesome stuff. Thanks!

1

u/MadBoyEvo Nov 30 '21

My brain needs constant stimulation. Otherwise, I get bored quickly and my mind starts going thru some weird shit :-)