How PowerShell Handles Mandatory Parameters When you define mandatory parameters in PowerShell, the user gets prompted for the value if it is...
How PowerShell Handles Mandatory Parameters When you define mandatory parameters in PowerShell, the user gets prompted for the value if it is...
Numbers are stored internally as bytes. An Int32 value, for example, uses four bytes. Sometimes it is required to split up the number into its byte...
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....
In the previous tip, we asked Active Directory to validate user account passwords. The same can be done with local accounts. Your PowerShell code...
What is WPF (Windows Presentation Foundation)? WPF (Windows Presentation Foundation) is not just a technique to create UIs. You can create any type...
Occasionally you come across lists (arrays) with empty elements. What’s the best way of removing empty elements? Creating a Software Inventory Using...
Removing BOM from Unicode Text Files Using PowerShell BOM (Byte Order Mask) is a characteristic byte sequence used in some Unicode encoded text...
Ensuring Correct Text File Encoding in PowerShell Text files can be stored using different encodings, and to correctly reading them, you must...
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...
Every Windows installation has a unique UUID that you can use to distinguish machines. While computer names can change, the UUID won’t: PS>...
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...
Using Microsoft Print to PDF from PowerShell Windows 10 and Windows Server 2016 finally come with a built-in PDF printer called “Microsoft Print to...