Archive for the ‘Windows Server’ Category


to locate the server responsible for a FSMO role open ADSI-Edit. The responsible attribute is in every case:


PDC-Emulator role
Naming context: DefaultNamingContext
(Right-click – properties -> fSMORoleOwner)

RID Master role
Naming context: DefaultNamingContext
DC=DOMAIN,DC=LOCAL,CN=System,CN=Rid Manager$
(Right-click – properties)

Schema Master role
Naming context: Schema
(Right-click – properties -> fSMORoleOwner)

Infrastructure Master role
Naming context: DefaultNamingContext
(Right-click – properties -> fSMORoleOwner)

Domain Naming Master role
Naming context: Configuration
(Right-click – properties -> fSMORoleOwner)



Today I got faced with a problem concerning a Windows Printserver. After a new printer was installed, the spooler services crashed again and again and generating registry events with ID 4097 and the source HpTcpMon (hptcpmon.dll).

After looking for changes made by the new printer, i figured out, that a new local port (HpTcpMon) was installed. To resolve this issue, I deleted the value in the registry.
1.Start Registry Editor

2. Locate  following key in the registry:

3. Check the following registry key for third-party port monitors, and remove the monitor mentioned in the event ID.

The Windows default port monitors should not be deleted. The default ports are:

AppleTalk Printing Devices (if services for Macintosh is installed)
BJ Language Monitor
Local Port
PJL Language Monitor
Standard TCP/IP Port
USB Monitor
Windows NT Fax Monitor

5. Expand Computer Management, expand Services and Applications, and then click services.

6. Right-Click Print Spooler, and then click Restart.

Today I had to extend the partition of a Windows 2003 Server.

In the past I did this several times with diskpart:

diskpart.exe -> list volumes
select volume [number of the partition to extend]
extend volume size=[SIZE TO EXTEND in MB]

After doing this, diskpart and the Windows Disk Management show the extended size but Windows Explorer didn’t so. A colleague pointed a KB article to me which described this behaviour.

You have type in another diskpart command (brought with SP2 – otherwise there is a hotfix):

select volume [number of the partition to extend]
extend filesystem

Now the whole space could be seen in the Explorer, too.

Read more:



Often you need to create some users for test purposes. Here you have a PowerShell script, which will do this procedure for you.

# Get domain and distinguished name
$Domain = (Get-ADDomain).distinguishedname

# Where to place the created users
$TargetOU = “Test”

# distinguished name for OrgUnit
$OUDN = “OU=$TargetOU,$Domain”

# How many users should be created
$NumberUsers= 50

# fill up description field with text and date
$Datetime = get-date -format G
$DField = “TEST ENVIRONMENT USER $datetime”

# OrgUnit check
$OU = Get-ADOrganizationalUnit -Filter { name -eq $TargetOU }
if($OU -eq $null)
{New-ADOrganizationalUnit -Name $TargetOU -Path $Domain}
{write-host “OU” $OU ” already there”}

# User creation

$u = 1
While ($u -le $usercount)
$UserName = “User” + $u
$UserDisplayName = “Testuser ” + $u
New-ADUser –Name $UserName –SamAccountName $UserName –DisplayName $UserDisplayName `
-Path $OUDN –Enabled $true –ChangePasswordAtLogon $true -description $DField `
-AccountPassword (ConvertTo-SecureString “YOUR_PASSWORD” -AsPlainText -force) -PassThru
$u = $u + 1



Today I cleaned up my PC and wanted to delete unnecessary OS files.
After reading the deployment guide for Windows 7 / 2008R2 I figured out the following command, which will delete those files permanent. You have to launch an administrative command line:

DISM.exe /Online /Cleanup-Image /spsuperseded