File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,9 @@ Function DisableWiFiSense {
142142# Enable Wi-Fi Sense
143143Function EnableWiFiSense {
144144 Write-Host " Enabling Wi-Fi Sense..."
145+ If (! (Test-Path " HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" )) {
146+ New-Item - Path " HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" - Force | Out-Null
147+ }
145148 Set-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" - Name " Value" - Type DWord - Value 1
146149 Set-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" - Name " Value" - Type DWord - Value 1
147150}
@@ -270,6 +273,9 @@ Function DisableCortana {
270273Function EnableCortana {
271274 Write-Host " Enabling Cortana..."
272275 Remove-ItemProperty - Path " HKCU:\SOFTWARE\Microsoft\Personalization\Settings" - Name " AcceptedPrivacyPolicy" - ErrorAction SilentlyContinue
276+ If (! (Test-Path " HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" )) {
277+ New-Item - Path " HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" - Force | Out-Null
278+ }
273279 Set-ItemProperty - Path " HKCU:\SOFTWARE\Microsoft\InputPersonalization" - Name " RestrictImplicitTextCollection" - Type DWord - Value 0
274280 Set-ItemProperty - Path " HKCU:\SOFTWARE\Microsoft\InputPersonalization" - Name " RestrictImplicitInkCollection" - Type DWord - Value 0
275281 Remove-ItemProperty - Path " HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" - Name " HarvestContacts" - ErrorAction SilentlyContinue
You can’t perform that action at this time.
0 commit comments