alexsc01 has asked for the wisdom of the Perl Monks concerning the following question:

I get this error when using Win32::OLE; to delete an object. The problem is name of the OU "Ulkomailta tulevat vaihto-opiskelijat/opettajat" which contains a '/' and a '-' I assume this is what's causing the problem. Same script works fine with other OU's, and same user can remove the user from AD using ADSI edit so I don't think it's a permission problem.
Win32::OLE(0.1711) error 0x80005000 after character 0 in "LDAP://OU=Students,OU=Users,OU=Ulkomailta tu +levat vaihto-opiskelijat/opettajat,DC=humak,DC=local" at C:\test.pl line 61.
Line 61 is $objParent = Win32::OLE->GetObject("LDAP://$ldap_found_active") ; Anyone have an idea what I do should do to the name before passing it to Win32::OLE->GetObject ? Changing the name of the OU is not viable.

Replies are listed 'Best First'.
Re: Error deleting object from AD ising Win32::OLE
by poj (Abbot) on Mar 15, 2016 at 13:36 UTC
      Yes thanks worked fine, so the / was causing a problem.