Great stuff :) Sent from my phone, please excuse any typo's as a result.
> On 24 sep 2013, at 00:56, "Avery, James" <[email protected]> > wrote: > > Niall, > Sorry I haven’t replied sooner, I’ve been out of town. > > I have it working! I went back through and fixed spaces and quotations and > it now works. > > <job id="checkBitLockerPartition"> > <script language="VBScript" src="ZTIUtility.vbs"/> > <script language="VBScript"> > > Dim oShell > Set oShell = CreateObject("WScript.Shell") > oEnvironment.Item("BitLocker_Partition") = > False > > strComputer = "." > Set objWMIService = GetObject("winmgmts:" _ > & > "{impersonationLevel=impersonate}!\\" _ > & strComputer & "\root\cimv2") > Set colDisks = objWMIService.ExecQuery _ > ("Select * from Win32_diskpartition") > > Dim PartSize > > For Each objDisk in colDisks > PartSize = > (objDisk.Size/1024/1024) > Wscript.Echo "Disk Size: " & > PartSize > if PartSize>299 and > PartSize<501 then > > oEnvironment.Item("BitLocker_Partition")=True > Wscript.Echo "Found 350Mb > partition – possibly BitLocker" > End if > Next > </script> > </job> > > > > Thanks again for your help!!! > > James > > From: [email protected] [mailto:[email protected]] > On Behalf Of Niall Brady > Sent: Wednesday, September 18, 2013 3:43 PM > To: [email protected] > Subject: Re: [mssms] Bitlocker - Determine if the bitlocker partition is > created > > to test the script try pxe booting into winPE and run the script while in > winpe after a use toolkit package step (you can pause the task sequence to > make it easier) see here > > > On Wed, Sep 18, 2013 at 10:14 PM, Avery, James > <[email protected]> wrote: > Yes, I have the ZTIUtility.vbs script in the same folder as the > Bitlocker_Partition.WSF file. I did what you stated with removing the ..\ and > I’m still receiving the same error. > > I copied the two files (ZTIUtility.vbs & Bitlocker_Partition.WSF ) to my > local drive to test and I’m receiving the same error from c:\temp directory. > > > C:\temp\test>dir > Volume in drive C has no label. > Volume Serial Number is 5A8C-882A > > Directory of C:\temp\test > > 09/18/2013 03:13 PM <DIR> . > 09/18/2013 03:13 PM <DIR> .. > 09/18/2013 03:07 PM 811 BitLocker_Partition.WSF > 08/30/2012 06:04 PM 130,317 ZTIUtility.vbs > 2 File(s) 131,128 bytes > 2 Dir(s) 17,507,250,176 bytes free > > C:\temp\test>cscript BitLocker_Partition.WSF > Microsoft (R) Windows Script Host Version 5.8 > Copyright (C) Microsoft Corporation. All rights reserved. > > C:\temp\test\BitLocker_Partition.WSF(2, 4) Windows Script Host: Expecting a > vali > d name > > > My script I copied from the website > <job id="checkBitLockerPartition"> > < script language="VBScript" src="ZTIUtility.vbs"/> > < script language="VBScript"> > > Dim oShell > Set oShell = CreateObject("WScript.Shell") > oEnvironment.Item("BitLocker_Partition") = > False > > strComputer = "." > Set objWMIService = GetObject("winmgmts:" _ > & > "{impersonationLevel=impersonate}!\\" _ > & strComputer & "\root\cimv2?) > Set colDisks = objWMIService.ExecQuery _ > ("Select * from Win32_diskpartition") > > Dim PartSize > > For Each objDisk in colDisks > PartSize = > (objDisk.Size/350/350) > Wscript.Echo "Disk Size: " & > PartSize > if PartSize > 299 and > PartSize < 501 then > > oEnvironment.Item("BitLocker_Partition") = True > Wscript.Echo > "Found 350Mb partition – possibly BitLocker" > End if > Next > > </script> > < /job> > > > > > From: [email protected] [mailto:[email protected]] > On Behalf Of Niall Brady > Sent: Wednesday, September 18, 2013 2:25 PM > To: [email protected] > Subject: Re: [mssms] Bitlocker - Determine if the bitlocker partition is > created > > is the script in the same folder or different folder as the mdt scripts > folder as the ztiutility script is referenced on line 2?, > > the ..\ in front of ZTIUtility will decide that (by adding or removing extra > ..\..\) > > so if you have the script in a subfolder of MDT scripts such as > scripts\customscripts the above wiill work, if it's in the same folder try > > <script language=”VBScript” src=”ZTIUtility.vbs”/> > instead > > hope that helps.. > > > On Wed, Sep 18, 2013 at 9:18 PM, Avery, James > <[email protected]> wrote: > > > Guys, > I’m trying to figure out if the Bitlocker partition is created because we’re > having to deploy Bitlocker to 2000 systems and some may have the Bitlocker > partition while others may not have the partition created. > > When trying to run the script created by Niall at > http://www.niallbrady.com/2012/04/10/how-can-i-determine-if-the-prepare-disc-for-bitlocker-partition-creation-was-successful/ > > And I’m not able to make this function by running > cscript.exe “%scriptroot%\BitLocker\BitLocker_Partition.WSF” > > I receive the following error: > BitLocker_Partition_Verify.WSF(2, 4) Windows Script Host: Expecting a valid > name > > > > This e-mail is intended solely for the person or entity to which it is > addressed and may contain confidential and/or privileged information. Any > review, dissemination, copying, printing or other use of this e-mail by > persons or entities other than the addressee is prohibited. If you have > received this e-mail in error, please contact the sender immediately and > delete the material from any computer. To unsubscribe send an email to: > [email protected] Hitachi Consulting Corporation, 14643 > Dallas Parkway, Suite 800, Dallas, Texas 75254 (HCAD0411) > > > > > > >

