Try the following:
Hope this helps,
You obviously have Optane Memory installed and operating or you wouldn't be hitting this error. Check in the Apps & Features app and see if there are entries for Intel Optane Memory and Intel Optane Pinning Explorer Extensions. If you see these entries, then you do have it installed and you can proceed to follow the steps I defined (though, if this is new to you, you may have to go to your laptop manufacturers site and download the Intel Optane Memory software package that they make available). If you don't have the software installed, then you need to install it (and skip the next paragraph).
The Intel Optane Memory feature will be displaying an icon in the System Tray. Double-clicking on this icon will bring up the GUI. Click on the Setup tab on the left. The scene presented should say that Intel Optane Memory is enabled and accelerating your system. Click on the Disable button to disable it. After going through the uninstall, reboot and reinstall , enter the Optane GUI and then this Setup scene. The button presented there now should allow you to re-enable Optane and accelerate your HDD.
If you never had the software installed, you will want to install it now. Once it is installed and you have rebooted, entering the GUI and going to the Setup scene will allow you to see the status of the acceleration that is going on. Actually, the tooltip presented when you mouse over the icon in the System Tray will provide you with this status as well.
Hope this helps (and doesn't overwhelm),
You needn't uninstall anything.
I looked for where the iaStorAfsServiceApi.dll was supposed to live, C:\Program Files\Intel\OptaneShellExtensions, but I didn't have it.
The Solution that worked for me is:
Under Add/remove programs select "Intel Optane Memory and Storage Management from the right pane ("Apps & Features").
Select "Advanced Options", then click "Repair" and then "Reset"
Restart your computer and then that iaStorAfsServiceApi.dll will be present, and you will no longer receive the error.