|
I am use to writing for ASP not kix. I need a little help this keeps erroring on line 15 expected ')'!
Dim $oRootDSE, $sDomainADsPath, $ldapPath, $filter, $entry, $searcher, $result, $DirectoryServices $oRootDSE = GetObject("LDAP://RootDSE") $sDomainADsPath = "LDAP://" & $oRootDSE.Get("defaultNamingContext") $ldapPath = $sDomainADsPath $filter = String.Format("(&(objectCategory=computer)(name=" & @wksta &"))") $entry = New $DirectoryServices.DirectoryEntry($ldapPath) $searcher = New $DirectoryServices.DirectorySearcher($entry, $filter, New String() {"description", "ADsPath"})
$result as $DirectoryServices.SearchResult = $searcher.FindOne() If Not IsNothing($result) Then If ($result.Properties.Contains("description")) Then $TxtDesc1 = $result.Properties("description")(0) End If If ($result.Properties.Contains("AdsPath")) Then $lblAdsPath = $result.Properties("AdsPath")(0) End If End If
Dim $objParent As New $DirectoryServices.DirectoryEntry($lblAdsPath, "administrator", "password", $DirectoryServices.AuthenticationTypes.Secure) $objParent.Properties("description").Value = (@FULLNAME) $objParent.CommitChanges()
|