createComputer

Creates an Active Directory computer object in the specified directory.

Samples

// The following example creates a computer account in the specified directory, and joins the computer
// to the directory.
val resp = directoryClient.createComputer {
    directoryId = "d-92654abfed"
    computerName = "labcomputer"
    password = "Str0ngP@ssw0rd"
    organizationalUnitDistinguishedName = "OU=Computers,OU=example,DC=corp,DC=example,DC=com"
    computerAttributes = listOf<Attribute>(
        Attribute {
            name = "ip"
            value = "192.168.101.100"
        }            
    )
}