Blog

Lees hier de laatste IGA-ontwikkelingen

VBScript to automatically insert strings into word document, print and close it

Make sure you have the file “document.doc” and it contains the bookmarks as you can see (Text1-7). The VBScript will open the document, insert all strings into the bookmarks, print ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management

LDAP search filter to check if user is member of a group

The member attribute (or memberOf) is a multi-valued DN list. Fortunately, in LDAP the = operator automatically does a “contains” instead of “equals” when dealing with multi-values. So to check ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management

VBScript to read exchange permissions (msexchmailboxsecuritydescriptor)

Since the permissions involving sending and reading mail are stored in different places, you need to read both the AD object permissions as well as the Exchange security descriptor. The ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management

VBScript to read Active Directory user permissions (ntsecuritydescriptor)

Reading AD ACLs isn’t particularly hard, the hard part is translating the information you get to something useful. The VBScript listed below contains all the constants required for you to ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management

VBScript to enable/disable “manager can update membership list” checkbox

Managing this checkbox proves harder than expected. The managedBy value is an attribute, but the checkbox is a delegation of control setting on the member attribute of the group object ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management

VBScript to manage receive-as A permission

There have been lots of variations on forums all around, I’ve tried to make this script more clean and easy to integrate in other scripting/cmd tools: strUser = wscript.arguments(0) 'CN=testuser,CN=Users,DC=t4evmdemo,DC=local ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management

PowerShell: get all group memberships (including nested and primary group)

Uses the TokenGroups attribute, which can only be read after refreshing AD’s property cache, since this attribute is not an actual schema attribute but generated on-the-fly. $user = [ADSI]"LDAP://CN=user1,OU=Tools4ever,DC=t4evmdemo,DC=local" $user.psbase.refreshCache(@("TokenGroups")) ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management

VBScript to read exchange mailbox size using wmi

The below VBScript uses WMI to connect to the Exchange namespace (parameter 1 = server, 2 = output path). It iterates through all mailboxes on the server and writes the ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management

,

PowerShell examples

Move all mailboxes from Server1 to a target database on Server2. Get-Mailbox -Server Server1 | Move-Mailbox -TargetDatabase Server2Executives Get all users from the OU “Gemigreerde Accounts” who don’t have UMRAMAILBOXMIGRATED ...
Lees meer

Arnout van der Vorst

Categorieën

Identity en Access Management