use Win32::OLE qw( in ); $Win32::OLE::Warn = 3; # carps bad permissions. $objPerson = Win32::OLE->new("CDO.Person"); $objURL = "LDAP://CN=$user,CN=Users,DC=ericksworld,DC=aciesnetworks,DC=com"; $objPerson->DataSource->Open("$objURL",undef,3); $objMailbox = $objPerson->GetInterface(IMailboxStore); if (Win32::OLE->LastError != 0) { print "\tThe error code was [" .(0 + Win32::OLE->LastError). "]\n"; print "\tThe error text was [" .Win32::OLE->LastError. "]\n"; die; } $strMDB = "LDAP://CN=Mailbox Store (FUJI)," . "CN=First Storage Group," . "CN=InformationStore," . "CN=FUJI," . "CN=Servers," . "CN=First Administrative Group," . "CN=Administrative Groups," . "CN=First Organization," . "CN=Microsoft Exchange," . "CN=Services," . "CN=Configuration," . "DC=ericksworld,DC=aciesnetworks,DC=com"; $objMailbox->CreatMailBox($strMDB); $objPerson->DataSource->Save(); if (Win32::OLE->LastError != 0) { print "\tThe error code was [" . (0 + Win32::OLE->LastError) . "]\n"; print "\tThe error text was [" . Win32::OLE->LastError . "]\n"; die; }