posts-powershell

Using Custom Prompts for Mandatory Parameters

Create ASCII Art

It’s amazing how versatile PowerShell is: with just a couple of lines of code, you can turn any photo and image into a piece of ASCII art....

Using Custom Prompts for Mandatory Parameters

Verifying Local User Account Passwords

In the previous tip, we asked Active Directory to validate user account passwords. The same can be done with local accounts. Your PowerShell code...

Using Custom Prompts for Mandatory Parameters

Converting Text to Image

What is WPF (Windows Presentation Foundation)? WPF (Windows Presentation Foundation) is not just a technique to create UIs. You can create any type...

Using Custom Prompts for Mandatory Parameters

Removing Empty Array Elements (Part 1)

Occasionally you come across lists (arrays) with empty elements. What’s the best way of removing empty elements? Creating a Software Inventory Using...

Using Custom Prompts for Mandatory Parameters

Removing BOM from the Unicode Files

Removing BOM from Unicode Text Files Using PowerShell BOM (Byte Order Mask) is a characteristic byte sequence used in some Unicode encoded text...

Using Custom Prompts for Mandatory Parameters

Get Text File Encoding

Ensuring Correct Text File Encoding in PowerShell Text files can be stored using different encodings, and to correctly reading them, you must...

Using Custom Prompts for Mandatory Parameters

SID of Current User

Retrieving the SID for the Current User in a Single Command Here is a one-liner that returns the SID for the current user and can be used in logon...

Using Custom Prompts for Mandatory Parameters

Formatting Date and Time (with Culture)

In the previous tip we illustrated how Get-Date can take a format string and convert DateTime values to strings. The string conversion always uses...