Posts Tagged "VBScript"

How to manage GPOs with vbScript?

Posted by on Mar 16, 2012 in Active Directory, Group Policies, VBScript | 0 comments

How to manage GPOs with vbScript?

You can do really really cool stuff with gpos in vbScript. I will show you how to export reports and give you some examples what else can be done going the vbScript way… The Group Policy Management console in Windows offers you the possibility to export reports about group policy object’s settings to html files – this, for example, is an excerpt of my default domain controllers policy: You can do this (and much more) by script too. Here is how you can do it… You can choose to save this report in a variable to do further processing in your script or you can save it to a file, just...

Read More

How to change BitLocker recovery password with vbScript?

Posted by on Oct 5, 2011 in BitLocker, Environment, VBScript, WMI | 0 comments

Related to my last post about how to change BitLocker recovery password from an elevated command prompt here is how you can achieve the same result with vbScript and WMI. This script is from Microsoft TechNet: BitLocker Drive Encryption Operations Guide: Recovering Encrypted Volumes with AD DS. ' Target drive letter strDriveLetter = "c:" ' Target computer name ' Use "." to connect to the local computer strComputerName = "." ' -------------------------------------------------------------------------------- ' Connect to the BitLocker WMI provider class '...

Read More

How to display Active Directory stored user account pictures in Windows?

Posted by on Aug 12, 2011 in Active Directory, VBScript | 7 comments

This topic is little more complex and we’ll need different steps to accomplish this feature. First at all you need the pictures for your user objects in the directory. You can use ADSI Edit, Powershell or 3rd party software to put pictures in AD. My blog post “How to save a user picture in Active Directory with vbScript?” will do this for you using vbScript. Second you’ll need a small application that sets a picture on your harddrive as the user account picture. I tested this only with Windows 7 – so there is no guarantee that this works with other versions too. Why...

Read More

How to save a user picture in Active Directory with vbScript?

Posted by on Aug 12, 2011 in Active Directory, VBScript | 0 comments

Active Directory offers the possibility to save pictures in a user’s object. These pictures can then be used in Outlook, Sharepoint or even self-written applications. Here is how you can do it: Function SavePictureToAdFromUrl(szADsPath, szUrl) Dim objUser, bytesRead, adoStreamRead Const adTypeBinary = 1 Set xml = CreateObject("Microsoft.XMLHTTP") xml.Open "GET", szUrl, False xml.Send If xml.status = 200 Then Set adoStreamRead = CreateObject("ADODB.Stream") adoStreamRead.Type = adTypeBinary adoStreamRead.Open adoStreamRead.Write xml.responseBody...

Read More

How to connect to and read data from Mailboxes, Calendars, … via Exchange Web Services and vbScript?

Posted by on Aug 3, 2011 in Exchange Server, VBScript | 16 comments

I offen wondered how I can programmatically read items from mailboxes stored within Microsoft Exchange Server. Some time ago I used Outlook with some macros that accessed the information I needed. But what if Outlook does not run? Or what if the computer crashed – who would logon and start Outlook? Sure you can find workarounds for every problem. But this never seemed to be a ‘cool’ solution to me. In the past few weeks – after I got my Exchange 2010 MCITP – I started to have a look at EWS – Exchange Web Services (available since Microsoft Exchange Server...

Read More