Sunday, November 18, 2012

Export Bitlocker Recovery Keys for a list of computers

If you want to generate a list of computers and their Bitlocker keys, then you can use this command. This will generate the keys in CSV format:


Adfind -b ou=xxx,ou=xxxxxx,ou=xxxx,ou=xxxxx,dc=xxx,dc=xxxx -csv -csvdelim # -f "(msFVE-RecoveryPassword=*)" msFVE-RecoveryPassword > bitlocker_keys.txt


Replace xxx with correct distinguished names of the required OU.
You need to have access to Bitlocker recovery keys.

Thursday, November 15, 2012

Running VBScripts on Vista/Win 7 64 bit computers

Sometimes while running vbscripts on Win 7 64 bit computers, the script gives errors in creating objects or unable to access shares.

The reason is that vbscripts are being executed as 64 bit scripts.

Some DLLs do not support 64 bits, so the script has to be run wit hthe 32 bit version of WScript.exe from the directory %SystemRoot%\SysWOW64 or the global Registry setting has to be changed:
HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command
(Standard) from
"%SystemRoot%\System32\WScript.exe" "%1" %*
to
"%SystemRoot%\SysWOW64\WScript.exe" "%1" %*