my $rootDseQueryString = "LDAP://RootDSE"; if ("" ne $domain) { $rootDseQueryString = "LDAP://".$domain."/RootDSE"; } print $rootDseQueryString."\n"; my $RootDSE = Win32::OLE->GetObject($rootDseQueryString);