Skip to main content

Posts

Showing posts from 2019

Challenges with WinSXS folder taking more disk space on Windows Server 2008/2008R2 and solution for it in Windows Server 2012/2012 R2 with new "Features on Demand"

I have seen many Systems Administrators having challenges in cleaning up WinSXS folder on system drive of Windows Servers 2008/2008R2. What is this WinSXS folder for? What does it contain within it? Is it safe to clean up those files under this folder by selecting them and pressing Delete button to get rid of them and reclaim disk space on C: drive? I know, you might be having these questions, if you would have come across the incidents where this folder would be taking lot of space of C: drive. I have seen Windows Server 2008 R2 machines where this folder would be taking over 20GB of disk space. Microsoft has released few knowledge-base articles as well showing how you can deal with these kind of situation. Microsoft realized the pain that Systems Administrators have cleaning up this folder and hence, they came up with "Features on Demand" on Windows Server 2012/2012 R2. So, now, you would be curious to know what this "Features on Demand" is and how it can help ove...

Brief introduction to Microsoft Azure Fundamentals - Core Services

Hello guys, As it's an era of Cloud Computing and Microsoft Azure being the leader in providing the cloud services, today, I would like to introduce you to the Microsoft Azure Core Services. This is just a brief introduction to Azure Core Services to prepare you for the AZ-900 Microsoft Azure Fundamentals certification. Azure Regions Each region has one or more data center(s). A region is a set of data centers deployed within a latency-defined perimeter and connected through a dedicated regional low-latency network. There are 54 regions worldwide available in 140 countries as of writing this blog. For more information, visit https://azure.microsoft.com/en-ca/global-infrastructure/regions/ . Azure Geographies Azure Regions are group of one of more data centers. Azure broadens that into geographies. Each Geography contains two or more regions. These geographies are to preserve compliance and data residency. Examples of Geographies are Americas, or Europe, or Middle ...

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