ps1

Converting Bitmaps to Icons

If you need a new icon and have no icon editor at hand, then you can take a bitmap file (create one with MS Paint if you must) and have PowerShell...

read more

Finding Numbers in Text

Regular Expressions are a great help in identifying and extracting data from text. Here's an example that finds and extracts a number that ends...

read more

Making Names Unique

To make a list of items or names unique, you could use grouping and then, when a group has more than one item, append a numbered suffix to these...

read more

Counting Log Activity

Did you know that Group-Object can analyze text-based log files for you? Here's sample code that tells you how many log entries on a given day a...

read more

Shrinking Paths

Many file-related .NET Framework methods fail when the overall path length exceeds a certain length. Use low-level methods to convert lengthy paths...

read more

Converting to Signed

If you convert a hex number to a decimal, the result may not be what you want: PS> 0xFFFF 65535 PowerShell converts it to an unsigned number...

read more

Getting Timezones

Here's a low level call that returns all time zones: PS> [System.TimeZoneInfo]::GetSystemTimeZones() Id : Dateline Standard Time DisplayName...

read more

Mapping Printers

To map a network printer to a user profile, here's a powerful low level command: rundll32 printui.dll,PrintUIEntry /in /n...

read more

Fun with Date and Time

Get-Date can extract valuable information from dates. All you need to know is the placeholder for the date part you are after. Then, repeat that...

read more

Chapter 14. XML

In today’s world, data is no longer presented in plain-text files. Instead, XML (Extensible Markup Language) has evolved to become a de facto...

read more

Counting Work Days

Ever wanted to know how many days you need to work this month? Here's a clever function that lists all the weekdays you want that are in a...

read more
1 89 90 91 92 93 128