@echo off
CLS
color 1f
for /f "tokens=4-5 delims=. " %%i in ('ver') do set "TestWinVer=%%i"
IF %TestWinVer% LSS 10 echo This script only works on Windows 10 Kernels. & GOTO :Finished

TITLE Checking for Admin...
echo.
cd %systemroot%\system32
call :IsAdmin


TITLE Allow Add a Phone feature to work again.
cls
echo Setting Registry to allow 'Add a Phone' feature...
Reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d "0" /f >NUL 2>&1
Reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d "0" /f >NUL 2>&1

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\phoneCall" /v "Value" /t REG_SZ /d "Allow" /f >nul 2>&1
Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\phoneCall" /v "Value" /t REG_SZ /d "Allow" /f >nul 2>&1

echo.
echo Add a Phone feature now active.  Note: You may see adverts and new apps/tiles appearing...

:Finished
echo.
pause

exit

=====================================================================================
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
 Cls & echo. & Echo You must have administrator rights to continue ... & echo.
 Pause & Exit
)
Cls

exit /b
