Wednesday, August 4, 2010

Grant full access on all Exchange 2010 mailboxes

From the Exchange Management Shell:

Get-Mailboxdatabase | Add-AdPermission -User Administrator -AccessRights GenericAll

Friday, July 16, 2010

sysprep: put computer in specific OU

sysprep.inf:

[Identification]
    JoinDomain=DOMAIN
    DomainAdmin=sysprepadmin
    DomainAdminPassword=password
    MachineObjectOU="OU=Desktops,OU=Machines,DC=Domain,DC=local"

Thursday, July 1, 2010

Loopback Policy Processing

User policies are applied based on who you are.
More specific: in what OU your user account is, since group policy objects are linked to OU’s.
But sometimes you want to apply policies based on where you are.
For instance, specific settings apply when you log on to a terminal server instead of your own pc.
This is where loopback policies come in place.

  • create a new OU
  • move the terminal server computer account to this OU
  • create and link a new group policy object
  • edit the policy object
  • computer policy, Administrative templates, System, Group Policy, and enable the Loopback Policy
  • choose to replace all user policies or to merge (policies from this policy object will overrule others)

Microsoft’s knowledgebase: http://support.microsoft.com/kb/231287

Monday, May 17, 2010

Nokia OVI sync error “80043c94”

Maybe it’ll be fixed in newer versions but todays latest version of Nokia OVI Suite is 2.1.1.1 and the latest firmware for my nokia E71 is 410.21.010.
So now everything’s up to date, still can’t sync contacts, agenda, etc with the OVI Suite. All i get is error “80043c94”.
Searched all over the net, but no solution. AARGH

Reason: You cannot have your application data (%appdata%) redirected. Revert to default settings (as part of your user profile, whichs makes your userprofile bigger/slower when logging in/out) and sync works again.

Wednesday, May 12, 2010

Robocopy (latest for XP)

XP or 2003 rktools gives you version XP010. There is a newer version, but hard to find.
Here’s XP026, the latest that’ll run on XP (Vista and up have 027 embedded but won’t run on XP).

robocopy.exe

Sunday, April 11, 2010

(Remove) The system reserved partition (windows 7 / 2k8 r2)

This “system reserved partition” is used for two things:

  • When booting from an encrypted volume (bitlocker), some bootfiles simply can’t be crypted. They reside on this partition
  • Windows Recovery Environment (WinRE)

If you do not need bitlocker and you want to keep things simple (e.g. for imageing purposes), you might want to remove this partition when installing Windows. In this example i assume there’s only one drive and it’s empty.

  • Start Windows setup as usual
  • At the screen where you select your language, keyboard and locale, press Shift+F10. You now enter a dos prompt.
  • diskpart
  • list disk
  • select disk 0
  • create partition primary
  • select partition 1
  • format fs=ntfs quick
  • exit
  • exit
  • now resume setup as normal, but select the primary partition at the partitioning screen

Tuesday, April 6, 2010

Windows 7 Audit Mode

Windows 7 audit mode is used for preparation of computers in order to add software and drivers without the need to do the final OOBE (Out Of Box Experience), which should be done by the end-user.
It is also used to create images for deployment, but i’ll do an article on that later.

  • Insert Windows 7 DVD and boot from it
  • Choose language and keyboard
  • Choose Install
  • Choose I Agree and Next
  • Custom installation and Next
  • Partition as you like, then select the disk or partition you want to install to, then press Next
  • The computer will reboot a couple of times
  • When the setup asks for a username, press CTRL+SHIFT+F3
  • The computer will now reboot
  • After reboot, you will automatically log in as Administrator and you’ll see a Sysprep screen. You can close it.

You are now in audit mode and will have the opportunity to install any application you want.

Reboot as many times as necessary. After reboot, you’ll see the sysprep window again, just close it every time until done installing.
Do a final reboot. At the sysprep screen choose the OOBE option.
Don’t check the Generalize option, unless you want to create an image for deployment purposes.

The system is now ready for the end-user with all applications pre-installed.

Friday, April 2, 2010

Always defragment your partitions!

The net is full of discussions whether severe fragmentation will be able to cause a system crash or not. Allthough in theory it will only cause a performance bottleneck, from own experience i can tell you it will be able to crash your system!
Therefor always defragment your partitions. It will not only gain performance but also stability!

Thursday, March 25, 2010

No properties of objects in MMC

Took me quite some time to figure out the problems this client was having:

  • couldn’t see properties of users in Active Directory Users and Computers
  • couldn’t see properties of events in the eventviewer
  • couldn’t move icons on the desktop
  • certain software wasn’t functioning

All came down to one simple solution:

regsvr32 %systemroot%\system32\ole32.dll

Microsoft KB 926932

Tuesday, March 16, 2010

Register a serie of .dll files

Run from prompt:

for /f "tokens=*" %a in ('dir /b *.dll') do regsvr32 /s %a

Remember: when running from a batchfile %a becomes %%a

Friday, March 12, 2010

Exchange 2003 parameters for small environments

Running around 300 servers in small environments (meaning: only one 2003 server as domain controller and file/print/exchange) lead me to the following tweaks:

@echo off

echo "This server has 1 GB or more of physical memory"
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v HeapDeCommitFreeBlockThreshold /t REG_DWORD /d 262144 /f
echo "This server is running Windows 2003"
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v SystemPages /t REG_DWORD /d 0 /f
echo "This server is a domain controller - faster shutdown"
reg add "HKLM\SYSTEM\CurrentControlSet\Control" /v WaitToKillServiceTimeout /t REG_SZ /d 20000 /f

Friday, February 5, 2010

Clone your linux boot partition

Where as Windows has many many cloning tools (e.g. Ghost), for linux cloning isn’t quite common.

Yesterday i needed to migrate an installation to another server. First make sure that you compile all the things you need in your current kernel.
With a Iinux live cd I created a backup of my boot partition (/dev/sda1) to a file on a usb disk (mounted as /backup)

dd if=/dev/sda1 of=/backup/sda1.dd

Then i wanted to restore it to another machine with a different partition size.
Here’s how:

  • partition your new harddisk
  • create an ext3 filesystem on your new boot partition
  • mount your usb disk as /backup
  • mount the backup file as /backupsda1
    mount -o loop -t ext3 /backup/sda1.dd /backupsda1
  • mount the newly created boot partition as /mnt
    mount /dev/sda1 /mnt
  • copy all files to the new partition
    cd /backupsda1
    rsync -av * /mnt/
  • mount proc and dev to your new partition
    mount -t proc none /mnt/proc
    mount -o bind /dev /mnt/dev
  • chroot to your new installation
    chroot /mnt
  • reinstall the bootloader (grub)
    grub-install /dev/sda

That’s it!

edit:
if your previous installation has an older version of grub, you might need to create your filesystem with a smaller inode size, otherwise grub won’t function correctly:

mkfs.ext3 -I 128 /dev/sda1

Wednesday, January 20, 2010

Detect flash and java versions

Flash:
New url: http://www.adobe.com … oftware/flash/about/
Old url: http://kb2.adobe.com … ps/155/tn_15507.html

Java:
http://java.com/en/d … load/help/testvm.xml

Thursday, January 7, 2010

Repair VSS

You’ll probably find this all across the internet, but just for my own reference:

@echo off
cd /d %windir%\system32
net stop vss
net stop swprv
regsvr32 ole32.dll
regsvr32 oleaut32.dll
regsvr32 /i eventcls.dll
regsvr32 vss_ps.dll
vssvc /register
regsvr32 /i swprv.dll
regsvr32 es.dll
regsvr32 stdprov.dll
regsvr32 vssui.dll
regsvr32 msxml.dll
regsvr32 msxml3.dll
regsvr32 msxml4.dll
pause

I deliberatly removed the “/s” from all the regsvr32 commands so i can see the results.