# --------------------------------------------------------------------------------------------------- function Convert-DNtoFQDN # --------------------------------------------------------------------------------------------------- { # Some Rights Reserved. See http://www.leadfollowmove.com/code-samples/ # About: Converts a RDN to FQDN format # Inputs: 1) The full relative distinguished name of an object in string format. # Returns: 1) The fully qualified domain name in string format. # Depends: None. Param ( $DNname ) $FQDN = $null $bits = $DNname.split(",") foreach ($part in $bits) { $a = $part.split("=") $FQDN = $FQDN+$a[1]+"." } # Need to drop the trailing dot $FQDN = $FQDN.substring(0,$FQDN.length -1) return $FQDN } # ---------------------------------------------------------------------------------------------------