Hello @heeha45
This is because disabling that way the Store is only possible for Education or Enterprise editions of Windows 10.
I would suggest 2 ways:
GPO:
From: COMPUTER CONFIGURATION > POLICIES > WINDOWS SETTINGS > SECRURITY SETTINGS > SOFTWARE RESTRICTION POLICIES >
Create a New Rule that disallows: %programfiles%\WindowsApps\Microsoft.WindowsStore*
(the * wildcard is because Microsoft have been changing the path to the Store in the last years so you want to cover all changes)
Registry key:
From: >> Expand KEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore >>Right click and >> select NEW >> REG_DWORD >> Name it RemoveWindowsStore >> Set the value to 1
Script to populate the registry key through logon Script:
$RegKeyPath = "HKLM:\KEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore"
$StoreItem = "RemoveWindowsStore"
$StatusValue = "1"
New-Item -Path $RegKeyPath -Force | Out-Null
New-ItemProperty -Path $RegKeyPath -Name $StoreItem -Value $StatusValue -PropertyType REG_DWORD -Force | Out-Null
Hope this helps!
Best regards,