Tag Archives: powershell

Microsoft PowerShell

Powershell Tip #124: Extract the OU (Organizational Unit) from DN (Distinguished Name) in Active Directory

Tip: You can extract the OU (Organizational Unit) from DN (Distinguished Name) in Active Directory. For example, someone sent you one report with DN only and you need to extract the OU.

Powershell Tip #123: Extract the CN (Common Name) from DN (Distinguished Name) in Active Directory

Tip: You can extract the CN (Common Name) from DN (Distinguished Name) in Active Directory. For example, someone sent you one report with DN only and you need to extract the CN.

Powershell Tip #120: List the headers of a CSV file

Tip: You can list the headers of a CSV file.

Powershell Tip #118: Test if path is a file or a folder using Test-Path cmdlet

Tip: You can test if a path is a file or a folder using Test-Path cmdlet:

Powershell Tip #117: Remove whitespaces from a string

Tip: You can remove multiple whitespaces from a string.

Powershell Tip #116: Remove empty elements from an array

Tip: You can remove empty elements in an array.