Category Archives: Windows Server

Where am I logged into and as Whom?

Applies to: Windows

What are the quickest ways to determine the computer you are logged into, and with which credentials?

1. Determine Computer Name

In Command prompt:

hostname

hostname-cmd

This works equally well in PowerShell.

hostname-ps

2. Determine Logged-In User

whoami

whoami-cmd

Same for PowerShell.

whoami-ps

Upgrade Windows Server 2012 Standard Edition to Datacenter Edition

Do I need to reinstall Windows if I want to upgrade my existing Windows Server 2012 Standard Edition to Datacenter Edition?

The answer is: No. You don’t have to reinstall.

All you need is a licensing change. I’m assuming you have purchased the datacenter license or you have volume licensing.

Step 1 – Determine Upgradability

DISM /online /Get-TargetEditions

Step 2 – Provide Datacenter License Key

DISM /Online /Set-Edition:ServerDatacenter /AcceptEula /ProductKey: (put your datacenter key here)

Step 3 – Reboot
Restart, and you’ll have a successfully upgraded machine.

Clear DNS Cache Manually

Applies to: Windows, Cisco

When you use DNS to resolve hostnames to IP addresses or services end point addresses, you sometime may want to clear the DNS cache manually.

On Windows you can clear the DNS cache with the “ ipconfig /flushdns ” command.

On Cisco gear you can use the “ clear hosts * ” in enable mode.

Command to Create a Dummy File

Applies to: Microsoft Windows

Dummy files can be very helpful in a Server environment. For example, having a 5 GB dummy file on the log and database partitions of an Exchange Server will help you resolve a space issue quickly. Simply delete the dummy file, and then you’d have some time to address the issue properly.

Use below Windows Commands to create dummy files in a size of your choice.

1 GB dummy file (1024*1024*1024=1073741824):

fsutil file createnew dummy.file 1073741824

5 GB dummy file (1024*1024*1024*5=5368709120):

fsutil file createnew dummy.file 5368709120