In the last post I covered DISM for the purpose of changing/upgrading the version of Windows, and we found that the DISM tool has existed since 2008, however in 2012R2 they added much improved, usable functionality. Did you know DISM is also responsible for things such as Windows updates?
Under the hood DISM is the tooling being used to install and maintain those wonderful Windows Updates you get every month on Patch Tuesday (is that still a thing?) Which also means we can use the toolset to also tidy up afterwards. Remember Disk Clean up (cleanmgr)? Well it’s a nicer CLI version of the Updates clean-up in there.
There are 3 levels of update clean up via DISM
Component Clean up – this cleans up updated components i.e. removing the packages used to install the updates
Reset Base – same as above, but means all deletes all superseded versions of every component in the component store, meaning you won’t be able to uninstall service packs/updates applied before this point in time
SPSuperseded – removes all backup components needed to uninstall the service pack, also you cannot remove the service pack anymore after using this command.
In short doing 2 and 3 will free up more space but makes rolling back very difficult, option 1 is a nice way to keep the system tidy:
Example on Windows Server 2012R2
Disk is at 37.1GB free after being fully updated and having key applications installed
Component cleanup is run and takes quite a while… (I had to go out and check 3 hours later, suspect it took ~1 hour)
Following the cleanup run we can see around 7GB has been freed up on the system
From this quick demonstration above it’s clear to see that significant disk space is used up by irrelevant, outdated files. The only reason to keep these is if you want to remove an update and reapply later, but surely not all 7GB worth…
I’ve started using the dism cleanup commands during my build process, so that before I start using a server in anger, I get it to as clean a state as possible, fully updated but tidy!
NOTE: You will require a valid Windows Server product key for this to work, this is in no way intended as a workaround to legitimate licensing.
Sometimes when just messing around with an idea or trying to prove a concept out you may find yourself quickly downloading an ISO from Microsoft for whatever OS version you’re testing on. Perhaps you haven’t got access to your usual ISO library or forgot credentials for your Volume Licensing portal etc.
The only issue with the TechNet downloads is that they are Evaluation editions, this means that within a certain number of days (usually 60 or 180 depending on version) you will not be licensed, activated or legit… slight problem here is that within 180 days you’ve probably built your best dev/test platform in years and don’t want to lose it, in fact you want to move it to your production servers, keeping it and maintaining it for eternity. Do you build a new VM with the proper ISO and Product key?
The answer is no, just upgrade your edition.
A while ago now, Microsoft introduced DISM (Deployment Image Servicing and Management tool) – a handy suite of command line tools for managing such situations. So how do I convert from evaluation to Server Standard or Datacenter editions, and what versions of Windows Server does this work with?
Open Command Prompt as Administrator
Open PowerShell as Administrator – it’s the 21st Century
Run the following command:
dism /Online /Get-CurrentEdition
The image above shows I’m running Version 10 (Server 2016) and I’m on a Server Standard license, therefore not Eval. However if you were on an Evaluation license it would say ServerStandardEval
In order to upgrade the license to a full version, or to go from Server Standard to Datacenter edition you can run the following:
Have you ever wondered whether you’re definitely on the latest patch of SQL?
I found a site a few years ago which I use at least once a week, every week.
In SSMS when you view a server’s properties you will see a version number e.g. 11.0.5058.0 which to most of us doesn’t mean a lot. On the face of it you can tell its v11 of the software, and you suspect it’s not the GA release due to the 5058 part, but in reality how does this translate to the year and service pack?
The best thing is that this site seems to be kept up to date all the time and further down the page you will see all sub-versions/ Cumulative updates and release dates, with hyperlinks to release notes.
I find this info very useful when debugging performance issues, especially with 2008R2/2012 so I can check the customer is on the latest patch of the version they have. Also with Microsoft’s changes to extended life of these products over the last few years, some patches are supported and others aren’t. To check what is/isn’t supported it’s worth browsing (and bookmarking) this link: https://support.microsoft.com/en-us/lifecycle/search/
The Product Lifecycle page at Microsoft is fully searchable for all MS products, and will tell you which patches are supported and which ones may already be out of support. e.g. for SQL Server 2012 you’re fine if on SP4, for SP3 you only have 8 months left, SP2 down is already out of support:
If you ask me we should all be on SQL 2016, but I fully understand the reasons we hold back, whether due to licensing costs, downtime issues, 3rd party support or other issues.
This guide was designed for use with Epicor ERP10 products, however applies to any and all IIS Application pools which you may wish to set to auto recycle.
To Set Automatic Application Pool Recycling:
Open IIS on the App Server
Under Application Pools, select the one you wish to configure:
On the right pane click Recycling (not Recycle!)
The Edit Application Pool Recycling Settings window appears, one recommendation would be to set a Specific Time out of business hours, and outside of any other ERP processes e.g. MRP.
Note that this allows recycling to be set at individual application pool level, you should check which applications this affects by reviewing the applications set to use this pool. To do this when the pool is selected, click the View Applications button the right pane (or by right clicking)
An alternative to individual app pool recycles is to do a full IISRESET which will restart all IIS related services and applications. To do this it’s best to setup a Windows Scheduled Tasks to run the command IISRESET will full administrator privileges.
Wow, 2018 has come around already and its time to yet again share some techy tips and posts that will hopefully not bore everyone too much.
I hope everyone who celebrates the festive season enjoyed it and are feeling as refreshed as I am, ready to hit the ground running for this year?!
I will start next week properly, although content is already in the works, I am going share Windows Server and SQL tips going forwards to widen the reach a little, so please share the posts to anyone you feel may benefit.