BITTLOCKER VBS SCRIPT ERROR

Hi,

I am trying to run the standard microsoft vbs script to enable PCs to write TPM info to Active directory and I am getting the following error:


line: 106
char: 1
error: 0x80005000
code: 80005000
source=(null)

The only part we have edited is "LDAP://dc=subdomain,dc=domain,dc=com" in line 104 (according to notepad2)  to add our domain details :

strPathToDomain = "LDAP://dc=subdomain,dc=domain,dc=com" & objRootLDAP.Get("defaultNamingContext") ' e.g. string dc=fabrikam,dc=com
 

line 105 is blank

line 106 is:

Set objDomain = GetObject(strPathToDomain)



Any idea what might be causing this. We are testing this, so the DC is not the primary DC, not sure if that's relevant.


Any idea what we are doing wrong?

I have attached a txtx of the vbs file and  a snapshot of the error.

Cheers!
vbserror.png
Add-TPMSelfWriteACE.txt
rookie_bAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobSampsonCommented:
Hi, you can't use this code
strPathToDomain = "LDAP://dc=subdomain,dc=domain,dc=com" & objRootLDAP.Get("defaultNamingContext") ' e.g. string dc=fabrikam,dc=com

Open in new window


because that will translate to
LDAP://dc=subdomain,dc=domain,dc=comdc=domain,dc=com

which is incorrect.

You can just use
strPathToDomain = "LDAP://dc=subdomain," & objRootLDAP.Get("defaultNamingContext")

Open in new window


or
strPathToDomain = "LDAP://dc=subdomain,dc=domain,dc=com"

Open in new window


to point to your subdomain.

Regards,

Rob.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.