Category Archives: Uncategorized

Powershell Tip #144: How to compare two string case sensitive

Tip: You can compare two strings case sensitive

The overload definitions for the compare method : String.Compare Method

Powershell Tip #143: Get the UUID of one local or remote computer

Tip: You can get the UUID (Universally Unique Identifier) of one local or remote computer.

Powershell Tip #142: How to concatenate two text files

Tip: You can contenate two text files in PowerShell. Here there is one folder with 3 files. Concatenate two files (File1 + File2) and save to the file File1andFile2.txt You can concatenate three files having different prefix names and save to the file All.txt Note: You can also use the -Encoding parameter

Powershell Tip #140: Convert string to Title Case

Tip: You can convert a string to title case (every word start with a capital letter).

Note: You have to convert the string to lower case (if not already) to ensure all words are converted in title case.

Powershell Tip #139: Replace every occurence of a string in a file

Tip: You can replace every occurence of a string in a file.

Powershell Tip #137: Convert number to binary

Tip: You can convert a number (64) to binary (1000000).

You can see the overload defintions of the ToString method from the Convert class:

Powershell Tip #136: Read first and last byte of a file

Tip: You can read the first and last byte of a file.