Skip to main content

Posts

Showing posts from November, 2019

High Availability and Fault Tolerance

Each and every organization wants to provide seamless and continuous service without any interruptions to their internal as well as external clients in case of planned or unplanned maintenance activity. When it comes to unplanned or unpredictable circumstances, there comes "Fault Tolerance." So, now the question is what is Fault Tolerance, what kind of solution this is and how it can help any organization to provide seamless service. To explain in simple terms, I will give you an example of a physical server with some hard drives with RAID configuration on it. In such case, if any of the hard drives fails, server will still be functional without any production impact, and monitoring system in place, for example, if SCOM agent is installed on the server, SCOM agent will generate an alert that the hard drive on that physical server is defunc, so later, the support team can replace the faulty hard drive. Benefit here is no impact to any clients. No clients would know that the ...

PowerShell Script to configure networking, generate credentials and join a computer to domain:

# configure networking New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.1.110 -PrefixLength 24 -DefaultGateway 192.168.1.1 Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 192.168.1.100 # generate domain admin credentials $pass = ConvertTo-SecureString -String 'P@ssw0rd' -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential('xyz\administrator',$pass) # wait for user Read-Host "Press any key to join the domain and restart" | Out-Null # join to domain Add-Computer -DomainName xyz.com -Credential $creds -Restart

Configure NIC Teaming in Windows Server 2012 R2

One of the great features to come out of server 2012 and expanded upon here in 2012 R2 is NIC teaming. NIC teaming gives us the ability to combine multiple network adapters together. They're presented to the operating system as a single adapter, and it gives us benefits, such as performance and redundancy. Now prior to server 2012, if you were to combine multiple network interface cards together, you would need specific network adapters from the same vendor plus third party software to make it all happen. And the bottom line is… it just wasn't simple. Now, with server 2012, it is built into the operating system native to Windows. It is also vendor and hardware independent. So, it is extremely easy to work with. It is also supported in both physical and virtual machines. Another nice thing, it supports up to 32 network interface cards, and this is also known as LBFO, which stands for load balancing and failover.  Let's say that we have got a bunch of physical network ad...

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 ...