Skip to main content

Posts

Apply Windows Server 2012 R2 Image to HP DL380 G9 Physical Server - Step-by-step

In the year of 2017, I worked on a migration project where I had to upgrade the Windows Server 2008/2008 R2 machines to Windows Servers 2012 R2. Since there were only few physical Windows Server 2012 R2 machines to be built, I syspreped and customized the image for HP physical servers based on the requirements of our Government client. Below are the steps to apply the custom Windows Server 2012 R2 image to HP DL380 G9 servers. RAID Configuration Configure RAID before loading the Windows Server 2012 R2 image on the new physical server (HP Server – Model: DL380 G9). Following are the steps to configure the RAID level 1. 1. Power on the HP DL380 G9 Server 2. Press F9 when you see the below screen. 3. Press Enter button to select the “System Configuration” option when you see the below screen. 4. Select the “Embedded RAID 1 : Smart Array P440ar Controller” from System Configuration” screen below. 5. Select the “Exit and launch HP Smart Storage Administra...

Powershell and WMI to calculate the Windows server uptime

Use the following PowerShell commands to find out how long the server has been up for since the last restart. PS C:\> $wmi = Get-WmiObject -Class Win32_OperatingSystem PS C:\> $wmi.ConvertToDateTime($wmi.LocalDateTime) – $wmi.ConvertToDateTime($wmi.LastBootUpTime) To display the uptime in formatted output, use the following commands: PS C:\Windows\system32> $name = "bcdpprd01" PS C:\Windows\system32> $wmi = Get-WmiObject -Class win32_operatingsystem -ComputerName $name PS C:\Windows\system32> $uptime = $wmi.ConvertToDateTime($wmi.LocalDateTime) - $wmi.ConvertToDateTime($wmi.LastBootUpTime) PS C:\Windows\system32> Write-Output "Uptime for $($name): $($uptime.Days) Day(s), $($uptime.hours) Hour(s), $($uptime.minutes) Minute(s), $($uptime.seconds) Second(s)" Output will be displayed as: Uptime for bcdpprd01: 0 Day(s), 15 Hour(s), 2 Minute(s), 4 Second(s) To check the uptime for multiple Windows Servers, create a text file with a list ...

Setup Wireshark capturing for a remote Windows server

Many times, while working as a Systems Administrator providing support for the Windows or Linux Infrastructure, you come across some issues where you may suspect that those issues might be causing on some server(s) due to network related issues. It might be a DNS related issues where DNS queries do not resolve some times for some unknown reason or it could be a case where remote user who establishes a VPN connection and assume that his/her domain user password is about to expire soon and he or she needs to reset the password over VPN connection, but password cannot be reset because the TCP port 464 is blocked. These are just some examples of the incidents when you would think to capture network traffic on some servers to find the root cause. Below, you will find the step-by-step instructions showing you how you can use the Wireshark to capture the network traffic for a remote server. You can capture the network traffic from within the server too on which you have issues, but some t...

Working with Server Core machine

Before I talk about the Server Core, I would, first of all, list the editions of Windows Server 2012 R2. There are 4 editions in Windows Server 2012 R2. Data Center Standard Essentials Foundation They can be installed with two states - either GUI or without GUI i.e. Server Core. Actually, there's also a third state here and it's kind of the middle ground between Server Core and Server with the GUI and that is the Minimal Server Interface. Server Core is being installed mostly for Domain Controllers, DHCP, Hyper-V and DNS. Server Core only has Command Line and PowerShell. All of those user interface elements that you're used to in Server with GUI like the Microsoft Management Console, Server Manager, Explorer, all of those things are gone. The whole idea here is that it contains a much smaller footprint. It's actually four gigabytes smaller than server with a GUI. This is going to reduce the potential attack surface too. So, it's smaller and more secure....

"The trust relationship between this workstation and the primary domain failed." issue, and PowerShell Script to monitor a specific event log and copy some logs to other location on Windows Server

Hi IT Support folks, I hope that you are doing well. The reason to write this post to share the incident that I came across recently while working in a multi-domain environment at one of the major banks here in Canada where one of the member servers stopped communicating with the domain intermittently and throwing the error, " The trust relationship between this workstation and the primary domain failed. " when user was trying to log into it using his domain credentials. In other words, this issue was seen when the session logon was attempted through Remote Desktop Protocol. This can happen due to a number of reasons. More than one host with the same name in Active Directory Domain environment. DNS issues due to which the member server cannot communicate securely with the Active Directory domain controller to have its computer account password reset. As a result, the computer account password used by the member server is different than the computer account password ...