I realize this is not a very exciting post, especially compared to my other wonderful musing on this site, but I felt I really had to write it to share the pain!
A colleague I work with needed to enable this feature on an Azure Windows Server 2019 machine to communicate with some old system that only supports Server Message Block version 1 (SMB1). Easy enough to add that right?
Trying the installation
Let’s first get some information about the feature:
Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
The output:

Notice the State property? The feature is disabled and the payload (installation files) are not on the Azure virtual machine.
When you try to install the feature, you get:

I guess I need the Windows Server 2019 sources!
Downloading Windows Server 2019
I downloaded Windows Server 2019 (November 2019 version) from https://my.visualstudio.com/Downloads?q=SQL%20Server%202019. I am not sure if you can use the evaluation version of Windows Server 2019 because I did not try that. I downloaded the ISO to the Azure virtual machine.
Mount ISO and copy install.wim
On recent versions of Windows, you can right click an ISO and mount it. In the mounted ISO, search for install.wim and copy that file to a folder on your C: disk like c:\wim. Under c:\wim, create a folder called mount and run the following command:
dism /mount-wim /wimfile:c:\wim\install.wim /index:4 /mountdir:c:\wim\mount /readonly
The contents of install.wim is now available in c:\wim\mount. Now don’t try to enable the feature by pointing to the sources with the -source parameter of Enable-WindowsOptionalFeature. It will not work yet!
Patch the mounted files
The Azure Windows Server 2019 image (at time of writing, June 2020) has a cumulative update installed: https://support.microsoft.com/en-us/help/4551853/windows-10-update-kb4551853. For this installatin to work, I needed to download the update from https://www.catalog.update.microsoft.com/home.aspx and put it somewhere like c:\patches.
Now we can update the mounted files offline with the following command:
Dism /Add-Package /Image:"C:\wim\mount" /PackagePath="c:\patches\windows10.0-kb4551853-x64_ce1ea7def481ee2eb8bba6db49ddb42e45cba54f.msu"
It will take a while to update! You need to do this because the files mounted from the downloaded ISO do not match the version of the Windows Server 2019 image. Without this update, the installation of the SMB1 feature will not succeed.
Enable the SMB1 feature
Now we can enable the feature with the following command:
dism /online /Enable-Feature /FeatureName:SMB1Protocol /All /source:c:\wim\mount\windows\winsxs /limitaccess
You will need to reboot. After rebooting, from a PowerShell prompt run the command below to check the installation:
Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
The State property should say: Enabled
Conclusion
Something this trivial took me way too long. Is there a simpler way? Let me know! š
And by the way, don’t enable SMB1. It’s not secure at all. But in some cases, there’s just no way around it.
Think I might have stumbled on the MSU… found the original link that was broken, but Microsoft moved it from the catalog 2019/10 folder to 2020/05… so direct download link that works for now is http://download.windowsupdate.com/c/msdownload/update/software/secu/2020/05/windows10.0-kb4551853-x64_ce1ea7def481ee2eb8bba6db49ddb42e45cba54f.msu
Great that your found it! I feared as much when I created the post that the links would go stale as they update Windows Server 2019.
Just had to elevate and run set command. https://docs.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3