Category Archives: Windows Server

Solutions for Windows Server Operating Systems

Using IOMeter to determine hard drive performance

Using IOMeter Overview

Using IOMeter will give you a great benchmark on any hard drives and network drives you have. I use this quite often as you can see the effects of new hardware, introducing Link-Aggregation, or troubleshooting drives to determine if they are losing performance.

Steps to Follow

1) Download IOMeter from the Official Site and run setup
IOMeter
2) All Programs -> Iometer -> Iometer

3a) Under ‘Topology’ tab, select the local machine

3b) Delete All workers but 1

3c) Under ‘Disk Targets’ tab select the drive you want to run the IO test on:

3d) Set Maximum Disk Size to 204800 Sectors (one sector is 512 B, so 204800 sectors gives 100MB)

IOMeter
4) Under ‘Access Specifications’ tab, under Global Access Specifications, select Default, and Click Add

Note: Default test is – 67% read, 33% write, 2 KB, 100% Random non/sequential writes, Burst Length 1 I/O. This is fine for this brief guide and the sample results below use this. 

 

IOMeter

 

5a) Under ‘Results Display’ tab, under Update Frequency, set to 10 seconds

 

IOMeter5b) Under ‘Test Setup’ tab, set Run Time to 1 minute ( If bench-marking a SAN or Network drive I recommend doing it for 5 minutes for consistency. )

6) Clone Workers from the first page to the number of cores you have. (Ex. Quad Core = 4 workers)

 

7) The click the green flag to start the test, and choose a location to save the results….

Conclusion

Remember to benchmark often and always do a before and after you make any changes. This is imperative so you can see any performance gains or losses you might incur. There are many times I have been surprised by the results of switching hardware or simply testing older hardware to see how it is holding up. One thing is for certain, I haven’t found a freeware tool that is better than IOMeter in the past 15 years that I’ve been doing IT.

Leave any Questions and Comments below and I’ll get back to you. I regularly publish on YouTube, Steemit, and christitus.com so if you’d like to see more videos please like, subscribe, and follow me.

PowerShell

How to remotely access Window Server 2016 Core in PowerShell 

This walkthrough shows you how to remotely access Window Server 2016 Core in PowerShell.

Windows Server 2016 Core is a great minimal install of windows server but doesn’t come with any desktop experience. This means we will be doing everything via command prompt or PowerShell for the initial setup. The great thing is you use Powershell and RSAT from a Windows 10 machine and working on the server is a snap. You get the ease of administration and the reliability and compact design of Core.

Here is how you enable PSRemote (Powershell Remote):
HOST – SERVER 2016 Core (Powershell prompt)
Enable-PSRemoting -Force
Your Workstation
Enter-PSSession -ComputerName 10.0.0.2
Note: you can use netbios name here as well

For any troubleshooting we will need to do make sure the initial setup is done by typing, sconfig once this has been completed you will have set the static IP, opened remote access, activated windows, and ran windows update.

Moving servers to Google, Amazon, or Microsoft.

Your Current Environment

The following article outlines what moving servers to Google Cloud Compute, Amazon Web Services, or Microsoft Azure means. Most businesses want to move to the “cloud” but have no idea what that means. If you’re a small business you typically have a couple computers scattered around with one storage device. If you’re a medium or large business you probably already have several servers at a location in a contract. Moving to the cloud is often pitched to businesses using Software-as-a-Service replacing the current system with a web application that runs through your browser. While this is ideal, in most instances it isn’t practical. So you keep paying for a bloated IT infrastructure that is dated, isn’t as reliable, and unable to change with your business needs.

The Solution

Leverage Google Cloud Compute, Amazon Web Services, or Microsoft Azure to move those servers to an enterprise environment. In all businesses, moving your servers will often end up costing between $100 – $400 per server a month depending on your environment and space requirements. When you factor in that there is no capital expenditure, maintenance, or power costs this is a far cheaper solution than your current environment. You also gain a SUBSTANTIAL increase in flexibility, performance, and reliability. So why hasn’t everyone transitioned to these services?

Migration Pains

The main issue is getting to these services. It’s hard to find businesses, technicians, or engineers that will do the migration. The reason for this is very simple… for employee’s they are afraid that their job will no longer be needed, for external help, it is too risky for them to take on the task with a very little reward at the end. So it is finding and hiring the right people to do this. In the end, you should be paying these companies directly.

Pitfalls

  1. Contracting a company that uses their own hardware and you pay them for substandard service and equipment on a monthly basis.
  2. Not understanding the extended downtime that is required for moving to these services. If you have 30+ servers it will take months for preparation, transfer time, and deployment.
  3. Degraded service if you have to work in a hybrid environment. This applies to large migrations, where you have servers with a cloud provider, and local servers connected through a VPN for the extended time it takes to complete the full migration.
  4. Mass Storage – Most of the cost of using these services come from storage, and typically it’s not till you hit the petabytes that you’d run into ROI issues. As a general rule of thumb, anything less than 1000 Terabytes is more cost-effective using these services.

Conclusion

I think every business should be leveraging this technology. The larger the business the harder the migration will be. Small businesses I’ve done in the course of a day, whereas larger businesses take considerably longer. Stay the course and keep searching for talent capable of helping with this transition. As far as personal preference I enjoy using all three of these major players in the market, but for Website Hosting and Linux boxes I like Google Cloud Compute the most, and for businesses already running Office 365 and Windows Server 2008+ Microsoft Azure makes for the easiest transition.

azure active directory

Force local active directory to sync to Office 365 with Azure ADSync

Use the following from an Elevated Powershell Prompt to force an AD sync to your O365 admin portal. You will be performing this on the server where Azure AD Sync is installed. When running this command you will need to wait 5 minutes before checking your portal to verify it is working. In larger environments this can take a longer time.

Import-Module “C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\ADSync.psd1”
Start-ADSyncSyncCycle -PolicyType Delta

Let me know in the comments below if you have any issues or this solution doesn’t work for you.

cleanup space on server

Cleanup Server WinSxS Free Space on Server 2008 and Server 2012

Run the following commands if you are running low on C: drive space. Do this in your PowerShell prompt and you will free up a substantial amount of space.

Please Note: You have to run updates on Windows Server 2008 if you are far behind and these commands don’t exist!

MASTER CLEANUP: (Run this First)
Dism.exe /online /Cleanup-Image /SPSuperseded

FOLLOWUP:
Windows 2008 Use: Dism.exe /online /Cleanup-Image /StartComponentCleanup
Windows 2012 Use: Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

dcreplication

“Target account name is incorrect” on Domain Controller Error

This article explains how to fix the “Target account name is incorrect” error you are getting on your domain controllers. This usually stems from a system administrator doing a snapshot revert on the Domain Controller which messes up the KDC service and domain replication. It also can happen if you had a DC offline for a long time 30+ days.

  • Stop and disable the Key Distribution Center (KDC) service on the troubled domain controller
    • net stop kdc
      sc config "kdc" start= disabled

      Note: space is REQUIRED after start=
      Alternatively: you can do this from the Services Panel
  • Purge the ticket cache on the local domain controller.
      • klist purge

    note: you can use ‘klist tickets’ to view tickets before purging them

  • REBOOT Troubled Domain Controller
  • Reset the troubled domain controller’s account password to the primary domain controller (PDC) emulator master using netdom /resetpwd. Find PDC using: netdom query fsmo
    • netdom /RESETPWD /s:pdcserver.domain.local /ud:domain\Administrator /pd:*
  • Synchronize the domain directory partition of the replication partner with the PDC emulator master
    • repadmin /kcc
  • Reboot one more time on Troubled DC and start and enable the KDC on the local domain controller:
    • sc config "kdc" start= auto
      net start KDC

Typically I wait about 5-10 minutes after this and start doing checks to see if it is now replicating properly. You can also force a replicate using repadmin /replicate but usually not necessary.

Exchange 2007 SP1 Installation Error HRESULT E_FAIL has been returned from a call to a COM component.

I was recently installing and configuring a new server with 32 processors and installing server 2008 Standard and Exchange 2007 SP1 Standard. During installation I received the following error:

HRESULT E_FAIL has been returned from a call to a COM component.

After finding a Knowledge-base article from Microsoft, I discovered Exchange 2007 SP1 doesn’t support installation on a server with more than 24 processors, but is perfectly fine updating and running on a server with more than 24 processors.

Here is the fix for installing Exchange 2007 SP1 on a server with more than 24 cores.

For Windows Server 2008 and for Windows Server 2008 R2

To reduce the number of active processor cores, follow these steps:

  1. Click Start start button, and then type cmd in the Search programs and files box.
  2. Right-click cmd.exe in the Programs list, and then click Run as administrator.
     UAC If you are prompted for an administrator password or for confirmation, type the password, or provide confirmation.
  3. At the command prompt, copy or type the following command, and then press ENTER:
    msconfig.exe
  4. Click the Boot tab.
  5. Select the operating system that is used with Exchange Server 2007. Typically, this is labeled Current OS.
  6. Click Advanced.
  7. Note the number of processors that are currently set, and then set the number of processors to 24 or fewer.
  8. Restart the server.
  9. Install Exchange 2007.
  10. Click Startstart button, and then type cmd in the Search programs and files box.
  11. Right-click cmd.exe in the Programs list, and then click Run as administrator.
     UAC If you are prompted for an administrator password or for confirmation, type the password, or provide confirmation.
  12. At the command prompt, copy or type the following command, and then press ENTER:
    msconfig.exe
  13. Click the Boot tab.
  14. Select the same operating system that you selected in step 5 and that is used with Exchange Server 2007.
  15. Click Advanced.
  16. Restore the number of processors to the value that you noted in step 7.
  17. Restart the computer.

Framework 3.5 Service Pack / Security Updates Fail

Taken from http://blogs.technet.com/b/essentialbusinessserver/archive/2009/05/07/microsoft-net-framework-3-5-sp1-kb951847-fails-to-install-on-ebs-servers.aspx

I have had several servers that were having .Net Framework 3.5 SP1 installation and security update issues. I ran the following commands and it cleared up the issue with the .Net 3.5 updates.

Event log showed Error 1325.’Microsoft.NET’ is not a valid short file name. 

Create PowerShell Script file .ps1: (Note: PowerShell must be installed check windows installed updates from appwiz.cpl)

# determine the framework and ebs guids. these will be unique for each install

$productskey = “HKLM:SOFTWAREClassesInstallerProducts”
$installedproducts = get-childitem $productskey
$guidstofix = 1..6

foreach ($product in $installedproducts)
{
$product = $product -replace(“HKEY_LOCAL_MACHINE”,”HKLM:”)
$PackageCode = get-itemproperty -path $product -name “PackageCode”
if ($PackageCode.PackageCode -match “4C78A69B7517C0446978C7906EBD7950”)
{ $guidstofix[0] = $PackageCode.PackageCode
$guidstofix[1] = $product.Substring($product.LastIndexOf(“”)+1)
}
elseif ($PackageCode.PackageCode -match “971651411F68D9B4CAF6FCDFB652BB9F”)
{ $guidstofix[2] = $PackageCode.PackageCode
# get the guid from the name of the key
$guidstofix[3] = $product.Substring($product.LastIndexOf(“”)+1)
}
elseif ($PackageCode.PackageCode -match “89C1D03477CD8054881EFCE6FAAFB588”)
{ $guidstofix[4] = $PackageCode.PackageCode
$guidstofix[5] = $product.Substring($product.LastIndexOf(“”)+1)
}
}

# get a list of the registry keys to parse
$regkeys = reg query HKLMSoftwareMicrosoftWindowsCurrentVersionInstallerUserDataS-1-5-18 /s

# find and replace all instances of D? with C?

for ($i = 0; $i -lt $regkeys.Length; $i++)
{
if ( ($regkeys[$i] -match “D?\”) -or ($regkeys[$i] -match “C\?\\”) )
{
$badkey = $regkeys[$i-1]
$badkey = $badkey -replace(“HKEY_LOCAL_MACHINE”,”HKLM:”)
for ($j = 0; $j -lt $guidstofix.count; $j++)
{

$badvalue = (get-itemproperty $badkey $guidstofix[$j] -ea silentlycontinue).($guidstofix[$j])
# filter out null values
if ($badvalue -match “^D?\”)
{
$goodvalue = $badvalue -replace (“D?\”, “C?”)
set-itemproperty -path $badkey -name $guidstofix[$j] -value $goodvalue
write-host “:::::replacing $badvalue with $goodvalue”
}
elseif ( $badvalue -match “^C\?\\”)
{
$goodvalue = $badvalue -replace (“^C\?\\”, “C:”)
set-itemproperty -path $badkey -name $guidstofix[$j] -value $goodvalue
write-host “:::::replacing $badvalue with $goodvalue”
}
}
}
}
# now replace c\?\\ with c:\

if(!(test-path “C:WindowsMicrosoft.NETFrameworkv3.5WFServicesReg.exe”))
{
write-host -fore ‘Red’ -back ‘Black’ “Please copy WFServicesReg.exe from a working installation to C:WindowsMicrosoft.NETFrameworkv3.5

}
if(!(test-path “C:WindowsMicrosoft.NETFramework64v3.5WFServicesReg.exe”))
{
write-host -fore ‘Red’ -back ‘Black’ “Please copy WFServicesReg.exe from a working installation to C:WindowsMicrosoft.NETFramework64v3.5”
}

Here is the direct script download, but I don’t like downloading scripts from the internet as a best practice. But, for you lazy people that don’t want to create the ps1 file and run it yourself: dotnetfixupv2

Note: If it keeps opening up in notepad, select open with and navigate to c:windowssystem32Windows Powershell1.0powershell.exe

After the Script is run install .Net Framework 3.5 SP1

The from Run Box type:

MsiExec.exe /fp {CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}

Cannot Rename Folders or Drag Drop Files into Network Drive

This error message is displayed when renaming folders or draging files from outlook into a network drive.

The drive that this file or folder is stored on does not allow long file names, or names containing blanks or any of the following characters: / : , ; * ? < > |

To resolve this problem, turn off Fast Logon Optimization. I recommend creating a GPO in your domain controller to achieve this. If its an isolated instance to one PC, you can use gpedit.msc to enforce it on that one PC.

Computer ConfigurationAdministrative TemplatesSystemLogon Always wait for the network at computer startup and logon

User ConfigurationAdministrative TemplatesSystemScriptsRun logon scripts synchronously

Windows Server 2008 could not continue installation as a reboot is needed

Microsoft Server setup cannot continue because a restart from a previous installation or update is pending.

The following Registery keys control this error message. If you have rebooted and are still experiencing this issue, clear out these keys and relaunch your installer.

HKEY_LOCAL_MACHINESOFTWAREMicrosoftUpdatesUpdateExeVolatile

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerPendingFileRenameOperations

The Setup MSI displays an error message if one of the following conditions is true:.

The value of the UpdateExeVolatile registry key is anything other than 0.

The PendingFileRenameOperations registry key has any value.

You can read this article about regedit.

http://technet.microsoft.com/en-us/library/cc164360(v=exchg.80).aspx