Remove Windows Server Disabled Roles and Features Payload Files

microsoft black logo

If you are running a Windows Server environment and you are becoming increasing low on system drive space, then you may want to consider removing the built in payload files for Windows Features. Windows Server comes with the payload files readily available if you want to add any additional Features or Roles to your server. … Read more

Windows Server 2019 Evaluation Product Keys

Microsoft Blue Logo

Following on from our popular posts for evaluation product keys for Server 2008 R2, Server 2012 R2 and Server 2016, this post brings us fully up to date with the evaluation keys for Server 2019. This forms part of our evaluation and KMS product key series where we have shared with you all the product … Read more

Get OU Distinguished Name

Active Directory Logo

There are many reasons as to why you would need to identify an Active Directory Organisational Unit’s Distinguished Name.

Most techies out there will use an AD distinguished name when writing or using PowerShell scripts.

However, quickly finding what the Distinguished name of a particular OU is not immediately clear. You can click on the object tab for information, but not the distinguished name.

Using PowerShell to get the Distinguished Name

The simple solution on how to quickly find an OU’s distinguished name is to use PowerShell itself.

The information you will need first is:

  • OU Name
  • AD Integration for PowerShell

That’s it – once you have this, you can go ahead and run the below PowerShell script:

Get-ADOrganizationalUnit -Filter 'Name -like "*"' | Format-Table Name, DistinguishedName -A

The only part you need to change in this PowerShell script is the * wildcard. If you leave it as a wildcard, it will bring back the distinguished name for all of your OU’s.

To bring back just one particular OU distinguished name, then change this * wildcard to the name of your OU.

Comments

If you have any problems with getting this working or if you just want to leave us a thanks – feel free to leave us a message below in the comments box.

Newsletter

If you want to be notified when we post more quality guides like this one, sign up to our newsletter and you will receive an email when a new post is live.

Join 520 other subscribers.

Don’t worry, we won’t be filling your inbox with spam and you can unsubscribe anytime you like.

Check for Thick Provisioned Disk Space in VMWare

Check-for-Thick-Provisioned-Disk-Space

If you want to run a check against your VMWare infrastructure for virtual machines that have thick provisioned disks, you can use VMWare PowerCLI to do this quickly and easily.

Our step by step guide below will show you what you need to do to bring back the results that you need.

Check for Thick Provisioned Disk – Step by Step Guide

Download VMWare PowerCLI

The first thing that you need to do is download the VMWare PowerCLI utility from the VMWare website. You can do this by clicking the link below:

Download VMWare PowerCLI

Go ahead and install this onto a machine that is on the same network as the VMWare infrastructure.

Connecting to the vCSA

Once you have installed PowerCLI, run the utility as an administrator (elevated):

open powercli

This will now go through and install the modules that PowerCLI requires and you should be left with a console ready to enter commands:

VMWare PowerCLI Console

Now you will need to connect to the vCenter Server Appliance (vCSA). To do this, run the following command:

Connect-VIServer -Server vCSA-1 -User admin@vmware.local -Password Pa55w0rd

where:

  • vCSA-1 = Your VCSA server
  • admin@vmware.local = administrator username with access to the vCSA
  • Pa55w0rd = Your administrator password

This should now show that you are connected to the vCSA.

Thick Disk Provision Command

Now that you are connected successfully to your local vCSA, you can run this command to get the Thick Provisioned Disks and which virtual machines that they are on:

Get-Datastore | Get-VM | Get-HardDisk | Where {$_.storageformat -eq "EagerZeroedThick" } | Select Parent, Name, CapacityGB, storageformat | FT -AutoSize

This will then output into a formatted table within the PowerCLI console, the full list of virtual machines, which disk it is, the capacity (GB) of the disk and the storage format.

Feedback

If you have any questions or problems with the guide, please feel free to leave us a message below in our comments section, or grab us on our social media channels and we will get back to you as soon as we can!

System Center Operations Manager Invalid Management Group Removal

Invalid Management Group Removal

We recently carried out some work for a client who had a completely ruined installation of System Center Operations Manager (SCOM).

Who had done what to it, we may never know, but it was clear that the only fix was to start again. This was not such a bad thing as they did want to change the name of their Management Group anyway – which secretly lead us to believe that someone had been messing and trying to carry this out, hence the mess of the installation!

We went ahead and carried out a completely new installation of Operations Manager as this is what they wanted, however, if you are an administrator of Operations Manager, you will probably know about the potential for an absolute nightmare here – the old Management Group and the new Management Group now being referenced on the servers and end users machines (although in this case, they only wanted servers being monitored by Operations Manager).

We managed to resolve this issue by using a PowerShell script. We did not write this PowerShell script ourselves and we apologise now for not giving the credit where it is due, but we cannot remember where we got it from – if it’s you, let us know and we will update with credit.

The plan is very simple, go into the Operations Manager server, check for error EventID 20046 in the Event Viewer (which will give you the name of a server trying to report with an invalid Management Group) then edit and run the PowerShell script to remove the reportedly invalid Management Group from that server.

PowerShell Script to Remove SCOM Invalid Management Group

The PowerShell script we used is below, note these variables that you must enter per server:

  • $ComputerName = The server name with the invalid management group
  • $ManagementGroup = The name of the invalid management group
param(
$ComputerName = "SERVERNAME",
$ManagementGroup = "MGMT GROUP NAME"
)

Function Remove-SCOMManagementGroup ($ComputerName)
{
$sb = {
param($ManagementGroup,
$ComputerName)
Try {
$OMCfg = New-Object -ComObject AgentConfigManager.MgmtSvcCfg
} catch {
throw "$ComputerName doesn't have the SCOM 2012 agent installed"
}
$mgs = $OMCfg.GetManagementGroups() | %{$_.managementGroupName}
if ($mgs -contains $ManagementGroup) {
$OMCfg.RemoveManagementGroup($ManagementGroup)
return "$ManagementGroup removed from $ComputerName"
} else {
return "$ComputerName does not report to $ManagementGroup"
}
}
Invoke-Command -ScriptBlock $sb -ComputerName $ComputerName -ArgumentList @($ManagementGroup,$ComputerName)
}
Remove-SCOMManagementGroup -ManagementGroup $ManagementGroup -ComputerName $ComputerName

Once the PowerShell script has completed, you either need to restart the Microsoft Monitoring Agent service (Service Name is: HealthService) on the affected machine or reboot it.

If you then go into your server Control Panel and then into the Microsoft Monitoring Agent applet, you should now see that you only have the corrent new Management Group on there and that the invalid old one has been removed.

System Center Orchestrator

Of course, if you know how to use System Center Orchestrator and you have it installed in your environment, you can setup a new Runbook to check for EventID 20046 and then trigger the PowerShell script from there.

Feedback

If you have any questions or feedback on this guide, we would love to hear from you. You can contact us via our Social Media channels or just leave us a message below in the comments box.

Windows Service Stuck in Stopping Mode

How-to-fix-a-windows-service-stuck-in-stopping-mode

This article will step you through the process of how to fix a Windows service stuck in stopping mode.

Windows Service Stuck

Have you ever had an issue on a Windows machine where you need to restart a Windows service? Most of us that work in IT will have done and will carry this process out quite regularly without any problem whatsoever. This is sometimes a preferred method of just restarting one particular service than having to complete reboot a server or end user computer.

After a restart of the Windows service has been selected, the service can get stuck in “Stopping” mode:

Windows Service Stuck

When stuck in this stopping mode, you cannot restart or stop the service. so this means that the only way around it is to reboot the Windows machine – which is what you were probably trying to avoid in the first place!

How to kill a Windows service stuck in stopping mode

At this point, the service you wanted to simply restart is stuck in stopping mode and will most likely never stop. To get around this problem, you will need to kill the stopping service.

To do this, follow these very simple steps:

Right click on the Start button at the bottom left of your screen and then select the Run option:

Right click on Start button and select run command

Then in the popup box, type services.msc

Click run and type services

Press Enter

Look for the service that is stuck in stopping mode and double click it to go into the Properties to identify its service name:

Windows Update service properties

Once you have identified the service name, open a command prompt and type the following command:

sc queryex [servicename]

Command Prompt for Windows Update service status

Then find the PID of the service within the output of the above query.

Kil the Service

Go ahead and run the taskkill command to stop it, now that all the information has been gathered to kill the service that is stuck in stopping mode,

In the command prompt type the following:

taskkill /pid [pid number] /f

This will stop the process fully and you can then restart it to complete the process that you wanted in the first instance.

Feedback

We would love to hear your feedback on this guide. If you have any questions or just want to leave us some comments on your experience with this issue, please either leave us a comment below or use one of our social media networks.

Broken Microsoft Update – KB4338818

microsoft black logo

You may have installed Microsoft Update KB4338818 during Patch Tuesday and now your Microsoft Windows Server 2008 R2 is broken right? Maybe even some Windows 7 machines?

Well guess what? You are not the only one!

Yes, Microsoft have done it yet again, released a dirty update that this time hits your Microsoft Windows Server 2008 R2 machines and Microsoft Windows 7 SP1 machines.

To be exact, KB4338818 causes a problem with your Network Interface Controller (NIC), whereas after applying the update, the card stops working in Windows!

The official information from Microsoft is below.

Known issues in this update (KB4338818)

Symptom Workaround
There is an issue with Windows and third-party software related to a missing file (oem<number>.inf). Because of this issue, after you apply this update, the network interface controller will stop working.
  1. To locate the network device, launch devmgmt.msc; it may appear under Other Devices.
  2. To automatically rediscover the NIC and install drivers, select Scan for Hardware Changes from the Action menu.

a. Alternatively, install the drivers for the network device by right-clicking the device and selecting Update. Then select Search automatically for updated driver software or Browse my computer for driver software.

Microsoft have given their above “Workarounds” but none of these worked for us.

So, if you are still experiencing any weird issues with your machines, take a stab at removing these and see if it helps.

How to Remove Problem Updates

If you need some guidance on what to do to remove these or any other updates, be it on a single machine or mass corporation remove, take a look at this post as we have added some instructions towards the end of the post that you may find helpful.

Who knows, in the future far, far away, we may be able to go a week without Microsoft releasing a dodgy update!

Feedback

We would love to hear your feedback on this article so come and join us on Facebook or Twitter and let us know what you think!

Google Time NTP Public Server

google

You may or may not be aware that Google provides a public NTP server.  They provide a free, global time service that you can use to synchronize to Google’s atomic clocks.

What is NTP?

The Network Time Protocol (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.

How is Google Public NTP different?

Google Public NTP serves leap-smeared time. They use this technology to smoothly handle leap seconds with no disruptive events.

They implemented Google Public NTP with their load balancers and their fleet of atomic clocks in data centers around the world.

Try it out

We recommend that you don’t configure Google Public NTP together with non-leap-smearing NTP servers.

Feedback

Should you have any questions or feedback on the Google NTP services, please leave us a message below using our comments section.

Windows Server – Internet Security Blocking Downloads

Microsoft

If you are an IT administrator then the chances are that you have come across issues with trying to download files directly from a website to your server.

You would have received this security alert when trying to download:

Your current security settings do not allow this file to be downloaded.

Your current security settings do not allow this file to be downloaded.
Click to enlarge

Although this is a default setting and in most parts should be left as is to enable security, what if you do want to download files to your server, regardless of the lowering of the security level?

Allowing Downloads

To allow downloads to your server, click the Start button at the bottom left of your screen and type Internet Options.

Internet Options from Start Menu
Click to enlarge

This will bring up the Internet Options dialog box. You should now click on the Security tab:

Internet Options Security Tab
Click to enlarge

Then click on the Custom level… button:

Internet Options Custom Level Button
Click to enlarge

This will bring up the Security Settings – Internet Zone dialog box. You then need to scroll down to the Downloads section and under File download, change the Disable radio button to Enable:

Windows Server - Internet Security Blocking Downloads 1

Click on the OK buttons until you have closed all the dialog boxes. Now try your download, you should now see that the download will run without any issues.

Feedback

If you have any questions about this guide or any feedback to let us know that this helped you, then we would love to hear from you. Just leave us a message below in our comments section.

Windows Server 2016 – Disable Server Manager on Startup

Techy geeks home

I don’t know about you, but Server Manager loading up every time I login to a Windows Server 2016 machine drives me nuts!

This is especially annoying when using my lab as most of the hardware is just old bits of kit that is not being used in production any longer.

In older versions of Windows Server, there was a nice convenient tick box within the Server Manager console allowing you to untick it and stop it loading on login:

Server Manager 20082 R2 Console
Click to enlarge

However, Microsoft in their wisdom seem to have removed this in the more recent releases of Windows Server.

So, how do we stop it loading up automatically?

There is actually two solutions to this problem. One for per individual user and one for all users. Below we will go through the steps required to disabling this on load for both methods.

Disable Server Manager for all Users

Logon to your Windows Server and allow the Server Manager to load as usual and then close it off.

Then click the Start button at the bottom left and type Task Scheduler. This should bring up Task Scheduler in your Start menu:

Windows Server Manager Task Scheduler Start Menu
Click to enlarge

This will load up your Task Scheduler utility:

Task Scheduler
Click to enlarge

You then need to browse through the tree structure to this folder location:

Task Scheduler Library -> Microsoft -> Windows -> Server Manager

You should now see in the right side panel, the ServerManager task:

ServerManager Task Schedule
Click to enlarge

You can go ahead and right click it and select Disable:

Disable ServerManager
Click to enlarge

This will then disable Server Manager console from loading on startup for all users.

Disable Server Manager Per User

If you just want individual users to disable the Server Manager Console on load, then you can use a very simple method detailed below:

Logon to the Windows Server and let the Server Manager Console load up fully. The in the top right corner, click on the Manage label and select Server Manager Properties:

Server Manager Properties
Click to enlarge

This will bring up another properties box like this:

Server Manager Properties
Click to enlarge

You should go ahead and check the Do not start Server Manager automatically at logon option and click the OK button:

Server Manager Properties do not start server manager on logon
Click to enlarge

Next time the user logs in, Server Manager Console will not load for them.

Feedback

We always like to hear your feedback on our guides, so if this has worked for you or if you have any questions, please feel free to leave us a message below in our comments section and will will get back to you as soon as we can.