Windows ServerComments (0)

Windows Server is a series of server operating systems developed by Microsoft. Windows servers are more powerful versions of their desktop operating system counterparts and are designed to more efficiently handle corporate networking, Internet/intranet hosting, databases, enterprise-scale messaging and similar functions.


You need sign in to comment! Sign up today!

How to easy remove IIS logfiles older than 30 days!Comments (0)

forfiles.exe /P C:\inetpub\logs\LogFiles\W3SVC1 /S /M u_ex*.log /D -30 /C "cmd /c del @file"

/P = FilePath
/S = Scan Recursive
/M = Match Filename
/D -30 = older than 30 days
/C = cmd to delete the files

Simple but yet very powerful!


You need sign in to comment! Sign up today!

How to set autologon for the Administrator in Windows Server 2008 R2!Comments (0)

This script will help you to set automatic logon for Windows Servers running Windows Server 2008 R2.
This is perfect for testenvironments:

$username = "Administrator"
$domain = "Contoso"
$password = "Password12"

# Setup Autologon on
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name AutoAdminLogon -Value 1 -ErrorAction SilentlyContinue

# Set Domain name
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultDomainName -Value $domain -ErrorAction SilentlyContinue

# Set Username
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultUserName -Value ($domain + "\" + $username) -ErrorAction SilentlyContinue

# Set Password
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name DefaultPassword -Value $password -ErrorAction SilentlyContinue


You need sign in to comment! Sign up today!

How to upgrade Windows Server 2008 R2 Standard to Enterprise edition!Comments (0)

This guide will help you upgrade (in-place) your Windows Server 2008 R2 Standard Edition to Windows Server 2008 R2 Enterprise Edition.

The tool to be used is called Deployment Image Servicing and Management tool or just DISM for short.

1. Verify that the server is runnig Standard edition
dsim /online /getcurrentedition

2. Next step is to set a temporary key provided by Microsoft: 489J6-VHDMP-X63PK-3K798-CPX3Y (back to activate on three days)

3. The next step is to list the available target editions
dsim /online /gettargeteditions

4. The last step is to specify the target edition and add the product key
dsim /online /set-edition:serverenterprise /productkey: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

5. Restart the server


You need sign in to comment! Sign up today!

Timeout when running iisreset /noforceComments (0)

When deploying Exchange server for example we need to change various attributes and permissions on our virtual directories. For instance when changing the default permissions on owa.

We must restart the service and we will use this command:
iisreset /noforce

...but it seems it's always fails with the error:
The service did not respond to the start or control request in a timely fashion. (2147943453, 8007041d)

We can run the command again and again until it is successfully restarted, but that's annoying.

Another approach is to use the timeout setting, if running this we can specify the timeout value:
iisreset /noforce /timeout:300

This will wait for the service 5 minutes...


You need sign in to comment! Sign up today!