Archive for the ‘@work’ Category.

Simple PowerShell Script to create a list with AD Users and their Groups

Had a request to create a list that shows all users of a given Active Directory Organizational Unit, and their group memberships.

Output is in CSV.
$allusers = Get-ADUser -SearchBase "OU=SubOU,OU=OU1,DC=dom,DC=com" -filter * -Properties * | Select-Object samaccountname, distinguishedname
"sep=;" | Out-File c:\temp\usertobundle.csv
foreach($myuser in $allusers)
$my_groups = Get-ADPrincipalGroupMembership $myuser.distinguishedname | select-object SamAccountName
foreach ($my_group in $my_groups)
$myuser.samaccountname + ";" + $my_group.SamAccountName | Out-File -Append c:\temp\usertobundle.csv

Not much more to say, did the job.


Internet Explorer automatic Proxy detection not working until you opened and closed the connection settings.

Strange IE 9 behavior when using “Automatically detect setting” and a Proxy.pac that is promoted through DHCP.

When starting IE, intranet sites are working from the beginning, but internet sites are only working after opening Internet Options –> Connections –> Lan Settings, and then confirming with “OK”. No changes have to be made in the settings, it’s just about opening them, and closing again. This issue is reproducible every time the user profile is deleted.

After some further investigation with Procmon it was clear that settings are written to the registry, even if no changes are made when open the Lan Settings dialogue. The important ones are:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

Setting these 2 values using a script, or in our case GPO’s will solve the issue.

Microsoft Office 2010 Silent MUI install

Microsoft didn’t go the normal MSI-way with Office 2010, and included a customization wizard, as they did with previous versions. However, creating a silent install with integrated MUI-packs wasn’t as self explaining as I thought. In this post, I want to document the steps I’ve made, to create a silent install.

Needed Software:
– MS Office 2010 Professional Plus EN
– MUI Packs (DE, FR, IT)

Integrating the MUI Packs:
This is quite easy, you can just copy the MUI Packs contents into the setup sources, while keeping the files that already exist.

Customizing installation:
Setup.exe /admin starts the Customization Wizard, it will create a .msp patch, which includes the settings you’ve made. Be sure to choose the silent install.
If you didn’t add any MUI Packs, you can run

Setup.exe /adminfile yourmsp.msp

, and it will install silently. If you’ve added additional languages, this will not work, because Setup will prompt you what to install (MUI-Pack or Office). If you choose office, it will also only install one language.
To solve this issue, you’ll need a config.xml file, which includes the product you want to install, display level and the additional languages:

<Configuration Product="ProPlus">
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
<AddLanguage Id="match" ShellTransform="yes"/>
<AddLanguage Id="en-us" />
<AddLanguage Id="fr-fr" />
<AddLanguage Id="de-de" />
<AddLanguage Id="it-it" />

You are now ready to start your silent Installation while running:

setup.exe /config yourxml.xml /adminfile yourmsp.msp

Microsoft .net Framework 3.5 on Windows XP Embedded

At work, I’m deploying Software to Windows XP embedded Clients. The Past days, i was analyzing a problem with Microsoft “Microsoft .NET Framework 3.0 Service Pack 1 (KB929300)”. The Installation Log said:

DepCheck indicates Microsoft .NET Framework 3.0a is not installed.

This Error is kind of confusing, since .NET Framework 3.0 was already installed, and there’s actually no version 3.0a which you can download. I then decided (after a lot of other ideas, which didn’t work out) to extract the 3.5 (yes, 3.5) Redist Package using winrar, and found the following MSI:


This MSI tells you to use setup.exe, and quits installing, so it has to be edited (I’ve used ORCA to do so). After I installed it, i was finally able to install .NET Framework 3.5