Apple's tool for installing macOS on devices without using local media is a fail-safe feature that allows administrators to reinstall or upgrade the OS. It is the first step to recovery during deployment.
Many versions back, Apple stopped offering physical media versions of the operating system, then the title OS X. By moving to a completely digital distribution model, Apple allowed administrators to download a clean copy of the operating system where it could be used to install or upgrade one unit as needed. Thus, administrators can also create an offline installer that can be copied to a USB flash drive to facilitate installations on devices with broken OSs or replace storage drives, requiring a clean installation to be performed.
In addition, every Mac with a modern version of macOS / OS X installed on it comes with the ability to upgrade or restore the operating system via a wired or wireless network connection directly from Apple's servers – without first having to download the standalone installer or create an offline USB installer – with all the necessary components downloaded over the internet first to a temporary partition before they begin with the local installation.
Through the latter option, known as Internet Recovery, Apple not only provides a current, clean copy of macOS for installation on compatible devices, but also seamlessly integrates firmware updates and if they are registered in the Apple Device Enrollment Program (DEP), the leader profile pointing to the newly restored device to its proper MDM server for further management of zero touches ahead.
SE: Apple macOS Mojave: An inside manual (free PDF) (TechRepublic)
There are several options available to administrators and users who want to install or upgrade macOS via Internet Recovery, all of which depend on which versions of macOS they are trying to install, based on the model of the Apple computer and which operating systems are supported on specific devices. Below, we will review the three methods used to invoke Internet recovery for each scenario.
How to install or install the existing version of macOS
Keyboard combination that can be held during startup: Command-R .
This method is the most common and is used to reinstall macOS based on the latest version of macOS installed on the target device. This is useful when performing a factory installation of the operating system, such as offering an existing device for a new user or initializing the device for use with DEP.
How to install or upgrade to the latest version of macOS
Keyboard combination to be held during startup: Option-Command-R.
This method should be used when performing a clean installation, usually when upgrading or replacing a storage drive, or when upgrading to the latest version of macOS supported by the target device. In the case of a corrupt operating system, the second method provides the ability to install macOS cleanly.
How to install or install the version of macOS that was pre-installed with your Mac
Keyboard combination to store during startup: Shift-Option-Command-R .
The main difference between this and the options listed above is that this process will not install the latest version of macOS, nor will it offer the latest known installed version of macOS. Instead, this third option will try to install the version of macOS (or OS X) that came with the device from the factory or the next available version.