我正在尝试使用Dynamoose搜索所有可用记录的单词。 我尝试了下面的代码,但无济于事...
Set objRootLDAP = GetObject("LDAP://rootDSE")
strRoot = objRootLDAP.Get("DefaultNamingContext")
Set objContainer = GetObject("LDAP://OU=Users-New Profile,OU=Users,OU=company," & strRoot)
Set objNewUser = objContainer.Create("User", "cn=" & sSAMAccountName)
objNewUser.sAMAccountName = sSAMAccountName
objNewUser.SetInfo
objNewUser.userPrincipalName = sSAMAccountName & "@domain.com"
objNewUser.givenName = sFirstName
objNewUser.sn = sLastName
objNewUser.mail = sSAMAccountName & "@domain.com"
objNewUser.DisplayName = sFullName
objNewUser.homeDirectory = "\\server\users$\" & sSAMAccountName
objNewUser.homeDrive = "H:"
objNewUser.tsProfilePath = "\\server\users$\" & sSAMAccountName
objNewUser.tsHomeDirDrive = "H:"
objNewUser.AccountDisabled = False
objNewUser.SetPassword "Password"
objNewUser.pwdLastSet = CLng(0)
objNewUser.SetInfo
答案 0 :(得分:0)
我使用了以下代码,并且运行良好:
let buscarEmails = async (email, sistema) => {
createDynamooseInstance()
const Email = dynamoose.model(process.env.TABELA_EMAIL_ENVIAR, enviarEmailSchema.enviarEmailSchema, { update: true })
const buscarEmails = Email.scan('destinatario').eq(email).where('sistema').eq(sistema).all(0, 0).exec().then(function (emails) {
return emails
})
.catch(function (err) {
return err.toString()
})
return buscarEmails
}