This is where the PSWriteHTML shines. With just a little effort, you get all sorts of ways to represent your PowerShell data with tables, charts, diagrams, gages, or even maps if there's a need for that. But one command I use in every single report New-HTMLTable and Out-HTMLView. The difference between the two is that New-HTMLTable acts a bit like ConvertTo-HTML, where it provides you a part of the HTML page where you can insert it into the New-HTML object. Out-HTMLView acts as an instant reporting tool, where it doesn't require any other things to do its magic. I already wrote a ton of blog posts on my website about PSWriteHTML, and if you want to find out more about those – please search my website, and you won't be disappointed. With the standard approach, you would use something like the code below, and then you would save it to an HTML file and get sort of basic-looking HTML.
The three steps from above can be achieved with just one step using PSWriteHTML, and the result is much more user-friendly.
By default, you get the ability to export to Excel, CSV, and pdf. You also get a standard search and search builder, which gives you a custom way of searching thru the data. If you're interested in those options, you can find them in blog posts that I have already published. Today I wanted to talk about one new option, which is called Fuzzy Search.
What does this mean in practice? If you're looking for Przemyslaw but type przemlaw in a regular search, you would get no results. The same goes for typing krgbt when you're looking for krbtgt. With just a simple switch you can now forget about typo problems!
As you can see, there are two new switches. The first one, FuzzySearch, enables fuzzy search, and the other one allows you to switch between fuzzy search and exact search within the interface. It's also possible to use FuzzySearchSmartToggle, which will enable FuzzySearch regardless of whether you use the FuzzySearch switch or not.
Both of those will give you the same result.
If you use the toggle in the right top corner, you get the ability to switch between standard and fuzzy options. This can be useful if a vague search will show a bit too much while you wanted an exact search. If you skip the FuzzySearchSmartToggle switch, you won't have an option to toggle between the two.