Category Archives: Uncategorized

Powershell Tip #72: Get the nested groups of a user in Active Directory

Tip: You can list the nested groups of a user in Active Directory: As an example, there are 3 groups :  Group 1, Group 2 and Group 3. Non-Nested Groups

Nested Groups

Note: Get-ADUSer requires ActiveDirectory module.

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 https://docs.microsoft.com/en-us/dotnet/api/system.string.compare

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.